VS2005 July CTP Compact Framework Form Events

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to Create a form that will run code, then exit with no user
interaction.
Problem:
If all the controls are docked, the Activated, Paint, and GotFocus do not
get called with the application is started.
If I put all my code in the Load, the form is never seen.

Thanks Mike Smith
 
That is a very weird requirement.. what is it you are really trying to
achieve?

Anyway... I haven't tried to repro what you described but maybe using a
forms.timer will help...

Cheers
Daniel
 
I'm trying to create a auto update app. From within the Main Application, I
run this "AutoUpdate" app to unzip the new files that have come down and then
re-start the Main App that I'm updating.
Also, I figured out why the Activated event was not firing. In the
beginning when I compiled, I got a Warning "Field
'VCUpdate.frmMain.components' is never assigned to, and will always have its
default value null". To correct this problem I set the "components" to null
in the Form load. When I took this out the Activated event started firing,
however this does not help the main issue, because the form is still not
displayed until after the "Activated" event.

Thanks Mike
 
Also, how would a forms.timer help.

Thanks Mike

Daniel Moth said:
That is a very weird requirement.. what is it you are really trying to
achieve?

Anyway... I haven't tried to repro what you described but maybe using a
forms.timer will help...

Cheers
Daniel
 
I still don't see your requirement/problem.

If you want to have an exe that does work with no UI then create a
console/nongraphical application.

If you want to create one with a UI, offer the user the chance to do the
work on a click of a button or do it in the form load eventhandler or in the
ctor or based on a timer firing (e.g. start a timer in the ctor of the form
for say 1 second and in the Tick event handler start your work). When your
app is done doing its job, offer the user the chance to quit it or exit it
yourself at that time or start a timer and close it when it Ticks.

If you provide more info maybe we can elaborate on alternative solutions.

Cheers
Daniel
 
I want a UI. I have a listbox, statusbar, and progressbar to show the status
of whats happening.
 
There was no question in there. So was my other post helpful or do you have
a specific question?

Cheers
Daniel
 
Sorry, the timer seems to work.

Thanks Mike

Daniel Moth said:
There was no question in there. So was my other post helpful or do you have
a specific question?

Cheers
Daniel
 
Back
Top