Results 1 to 3 of 3

Thread: Form Close

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    76

    Form Close

    My application shows another form (FormB) with "Modal " by selecting a menu option in main form (FormA).

    In Form B, is that any event (preferably single event) that can catch the following sitatuion:
    - form close by pressing a command button with FormB.unload;
    - form close by pressing the cross at right top corner.

    I can catch the command button close event but not the later and I prefer a single event to catch both of them so that I can update the status value in FormA.

    Thank you.

  2. #2
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    Use the Form_Unload or Form_QueryUnload events.
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    76
    Thanks for your advice. It does work if my Visual C DLL has not been called.

    My Visual C 6.0 DLL program receive control from a VB (Form B) and the VC update the status bar of VB main form (which call Form B) directly by the following:

    SendMessage(h.hwndSB, SB_SETTEXT, SBITEM_STATUS,(LPARAM)"File erase in progress ...");

    Before calling this statement, my VB program can update that status bar message content freely. It is strange that my VB program cannot update that status bar message content anymore. Is there is rescue?

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