D
David Bonnell
I have a Windows Forms app that is intended to launch via the SendTo
feature. I want it to perform work (in the background) while updating
a progress bar in the main window.
The problem: I want this to run without any user interaction (except
for launching the app via SendTo).
The form is created via an Application.Run(new myForm()) call, which
then proceeds through the form constructor.
When the constructor returns and the form is displayed, I have no way
of instructing the application to "begin" work. As a workaround, I
temporarily placed a button on the form for the user to initiate work.
I must be missing something. This seems like it would be trivial to
implement. I was considering using a timer as a hack, but surely
there is a better option. Launching a worker thread before exiting
the constructor doesn't strike me as a very good idea either...
Any ideas?
feature. I want it to perform work (in the background) while updating
a progress bar in the main window.
The problem: I want this to run without any user interaction (except
for launching the app via SendTo).
The form is created via an Application.Run(new myForm()) call, which
then proceeds through the form constructor.
When the constructor returns and the form is displayed, I have no way
of instructing the application to "begin" work. As a workaround, I
temporarily placed a button on the form for the user to initiate work.
I must be missing something. This seems like it would be trivial to
implement. I was considering using a timer as a hack, but surely
there is a better option. Launching a worker thread before exiting
the constructor doesn't strike me as a very good idea either...
Any ideas?