CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #2
    Join Date
    Dec 2005
    Location
    Waterloo ON
    Posts
    545

    Re: How to recognize form [X] close?

    Then don't use DialogResult value if you can't figure out how to handle it. Declare a public variable in the form to save DialogResult value, after the form is closed, check the public variable.

    Like: when OK button is clicked, set the public variable to DialogResult.OK; when Cancel button is clicked or [X] is clicked, set it to DIalogResult.Cancel.

    Hope it helps.
    Last edited by jasonli; May 5th, 2009 at 09:22 AM.
    The difficulty is that you have no idea how difficult it is.

    .Net 3.5/VS 2008

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured