Groups | Blog | Home
all groups > c# > february 2006 >

c# : Another Form1_Load function?



Joe
2/4/2006 9:12:57 PM
Is there another Form1_Load function?

I need to call a function to exit but I want to have it called right after
the User interface have been loaded and appeared on screen. Right now the
Load function doesn't load the User interface to be viewable and the code I
call the exit function in the load function doesn't really help in my cause.

I like to call exit right after the form has been loaded, is there such a
function?

Nicholas Paldino [.NET/C# MVP]
2/4/2006 9:28:27 PM
Joe,

I'm kind of confused why you want to exit the form right after it loads.
What are you trying to do?


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

[quoted text, click to view]

Joe
2/4/2006 10:10:48 PM
I like the program to be called by the taskmanager. Onces it called, it
will do something. And then exit. Of course I like to see the UI while its
doing the tasks.


"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in
message news:%23qIbZvfKGHA.2300@TK2MSFTNGP15.phx.gbl...
[quoted text, click to view]

John Sun
2/4/2006 11:09:35 PM
[quoted text, click to view]
[The program called by task manager doesn't exit right away unless you
close it, it seems pretty confusing to me . I know you want to hoop up
some events like Form_PostUnload().]

[quoted text, click to view]
Jon Skeet [C# MVP]
2/5/2006 12:00:00 AM
[quoted text, click to view]

It sounds like you should be creating a new thread when the app is
loaded, updating the UI in a thread-safe way using
Control.Invoke/BeginInvoke, and then exiting the application
afterwards.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
AddThis Social Bookmark Button