Click here to Skip to main content
15,899,314 members
Home / Discussions / C#
   

C#

 
GeneralRe: Generic and Type of Pin
PozzaVecia29-May-11 10:57
PozzaVecia29-May-11 10:57 
AnswerRe: Generic and Type of PinPopular
AspDotNetDev29-May-11 10:33
protectorAspDotNetDev29-May-11 10:33 
GeneralRe: Generic and Type of Pin
PozzaVecia29-May-11 10:58
PozzaVecia29-May-11 10:58 
NewsGestures 14+: Project on Hand Gesture Recognition Pin
makboyakram28-May-11 1:00
makboyakram28-May-11 1:00 
GeneralRe: Gestures 14+: Project on Hand Gesture Recognition Pin
Richard MacCutchan28-May-11 1:47
mveRichard MacCutchan28-May-11 1:47 
GeneralRe: Gestures 14+: Project on Hand Gesture Recognition Pin
makboyakram28-May-11 3:45
makboyakram28-May-11 3:45 
QuestionHow to keep Form Instance for further Re-open? Pin
Paramu197328-May-11 0:47
Paramu197328-May-11 0:47 
AnswerRe: How to keep Form Instance for further Re-open? Pin
DaveyM6928-May-11 2:48
professionalDaveyM6928-May-11 2:48 
From Reflector, the code for Form.Close is:
C#
public void Close()
{
    if (base.GetState(0x40000))
    {
        throw new InvalidOperationException(SR.GetString("ClosingWhileCreatingHandle", new object[] { "Close" }));
    }
    if (base.IsHandleCreated)
    {
        this.closeReason = CloseReason.UserClosing;
        base.SendMessage(0x10, 0, 0);
    }
    else
    {
        base.Dispose();
    }
}

So as you can see, if you close the form, it will be disposed. If you want to keep the same instance, hide it. Otherwise, check if your field is null, if so - recreate it; if not, show it.
Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



GeneralRe: How to keep Form Instance for further Re-open? Pin
Paramu197328-May-11 3:39
Paramu197328-May-11 3:39 
QuestionModem Pin
Chuck Richards27-May-11 9:03
Chuck Richards27-May-11 9:03 
AnswerRe: Modem Pin
AnnieMacD27-May-11 11:16
AnnieMacD27-May-11 11:16 
AnswerRe: Modem Pin
Luc Pattyn27-May-11 14:25
sitebuilderLuc Pattyn27-May-11 14:25 
GeneralRe: Modem Pin
Chuck Richards30-May-11 11:10
Chuck Richards30-May-11 11:10 
QuestionClickOnce [modified] Pin
kurmanc27-May-11 6:02
kurmanc27-May-11 6:02 
AnswerRe: ClickOnce Pin
kurmanc29-May-11 22:25
kurmanc29-May-11 22:25 
Questionreceive a call on computer Pin
aeman27-May-11 4:38
aeman27-May-11 4:38 
AnswerRe: receive a call on computer Pin
Luc Pattyn27-May-11 4:48
sitebuilderLuc Pattyn27-May-11 4:48 
GeneralRe: receive a call on computer Pin
aeman27-May-11 5:42
aeman27-May-11 5:42 
GeneralRe: receive a call on computer Pin
Dave Kreskowiak27-May-11 7:44
mveDave Kreskowiak27-May-11 7:44 
GeneralRe: receive a call on computer Pin
aeman27-May-11 8:48
aeman27-May-11 8:48 
GeneralRe: receive a call on computer Pin
Dave Kreskowiak27-May-11 14:59
mveDave Kreskowiak27-May-11 14:59 
GeneralRe: receive a call on computer Pin
aeman28-May-11 3:20
aeman28-May-11 3:20 
GeneralRe: receive a call on computer Pin
Dave Kreskowiak28-May-11 4:42
mveDave Kreskowiak28-May-11 4:42 
GeneralRe: receive a call on computer Pin
aeman28-May-11 6:56
aeman28-May-11 6:56 
GeneralRe: receive a call on computer Pin
Dave Kreskowiak28-May-11 10:07
mveDave Kreskowiak28-May-11 10:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.