Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 4:29 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: C# Help
PostPosted: Tue Oct 06, 2009 9:18 pm 
Offline
Knowledgeable

Joined: Sun Jul 29, 2007 12:23 am
Posts: 199
Like in VB6 how you can have Form_Unload or something, how do you control the events when the form closes?


Top
 Profile  
 
 Post subject: Re: C# Help
PostPosted: Tue Oct 06, 2009 10:46 pm 
Offline
Regular
User avatar

Joined: Sun Jun 01, 2008 8:39 pm
Posts: 91
FormClosing (Happens before the form is closed)

and

FormClosed (Happens after the form is closed)

Code:
    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

    End Sub


Code:
    Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

    End Sub


Top
 Profile  
 
 Post subject: Re: C# Help
PostPosted: Wed Oct 07, 2009 2:26 am 
Offline
Knowledgeable

Joined: Sun Jul 29, 2007 12:23 am
Posts: 199
Ok so in C# it would be

Code:
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
    // My code
}


Top
 Profile  
 
 Post subject: Re: C# Help
PostPosted: Wed Oct 07, 2009 2:32 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
http://www.java2s.com/Code/CSharp/GUI-W ... gevent.htm

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: C# Help
PostPosted: Wed Oct 07, 2009 3:18 am 
Offline
Regular
User avatar

Joined: Sun Jun 01, 2008 8:39 pm
Posts: 91
Sorry forgot you wanted C# =P


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group