RSS Forums RSS
Please support our C# advertiser: Programming Forums
Views: 4000 | Replies: 2
Reply
Join Date: Feb 2005
Location: Ballarat, Australia
Posts: 175
Reputation: Paul.Esson is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 8
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Code run when form shown ?

  #1  
Jun 3rd, 2005
I was wondering if there is anyway to make Windows Forms do certain tasks whenever its shown ?

- Thanks in advance Paul
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2005
Posts: 5
Reputation: Abyss is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Abyss Abyss is offline Offline
Newbie Poster

Re: Code run when form shown ?

  #2  
Jun 7th, 2005
You can always add timer which starts when form activates.

On timer event should contain what tasks form should do.
Reply With Quote  
Join Date: Jul 2003
Location: Bamberg, Germany
Posts: 117
Reputation: Iron_Cross is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 2
Iron_Cross's Avatar
Iron_Cross Iron_Cross is offline Offline
Junior Poster

Re: Code run when form shown ?

  #3  
Jun 14th, 2005
Actually what you should do is add an event handler to either the Load event or the VisibleChanged event. It all depends on if you want the code to execute everytime the form is shown, or only the first time the form is shown.
Obviously, use Load if you only want the code to execute the first time. Use VisibleChanged if you want the code to execute everytime the form is shown.
elitehackers.info
Today's Penny-Arcade!
Pain is weakness leaving the body!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:30 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC