CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2000
    Posts
    6

    Close Button not Working

    The close buttons (the "x" on the top right corner of the forms) are sometimes not responding. But I'm very sure that the forms are working fine, becoz I got command buttons that can close the forms. Is there any solution to this? Thanx.


  2. #2
    Join Date
    Feb 2000
    Location
    Indiana
    Posts
    308

    Re: Close Button not Working

    Is there any pattern to when they do not work?


  3. #3
    Join Date
    Feb 2000
    Posts
    6

    Re: Close Button not Working

    I have multiple forms on my application. I suspect that it is because of the way I open up the forms? (coz I open and close them by setting the visible property) Actually is there any ways that I can set the function of those close buttons?


  4. #4
    Join Date
    Feb 2000
    Location
    Ireland
    Posts
    808

    Re: Close Button not Working

    Put a breakpoint in the QueryUnload event of the form and check to see if unloadmode =0 (This means that you have clicked the "x").
    I can't think of any reason that this wouldn't work but maybe you should consider using form.show and form.hide.


  5. #5
    Join Date
    Feb 2000
    Posts
    6

    Re: Close Button not Working

    I found out that when I hardcode the display of the contents on the textbox controls on the form, the "x" button doesn't respond. But when i leave the textbox displays alone, the button now works. That's odd.....


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