Mirage Source
http://www.miragesource.net/forums/

C# Help
http://www.miragesource.net/forums/viewtopic.php?f=158&t=6278
Page 1 of 1

Author:  Beres [ Tue Oct 06, 2009 9:18 pm ]
Post subject:  C# Help

Like in VB6 how you can have Form_Unload or something, how do you control the events when the form closes?

Author:  Toast [ Tue Oct 06, 2009 10:46 pm ]
Post subject:  Re: C# Help

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

Author:  Beres [ Wed Oct 07, 2009 2:26 am ]
Post subject:  Re: C# Help

Ok so in C# it would be

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

Author:  Nean [ Wed Oct 07, 2009 2:32 am ]
Post subject:  Re: C# Help

http://www.java2s.com/Code/CSharp/GUI-W ... gevent.htm

Author:  Toast [ Wed Oct 07, 2009 3:18 am ]
Post subject:  Re: C# Help

Sorry forgot you wanted C# =P

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/