Results 1 to 6 of 6

Thread: *** RESOLVED *** MDI Form blanks out !!

  1. #1

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Exclamation *** RESOLVED *** MDI Form blanks out !!

    I have the following code in the Unload event of my MDI Master form :

    VB Code:
    1. Private Sub MDIForm_Unload(Cancel As Integer)
    2.  
    3.     Quit = MsgBox("Are you sure you want to Quit ?", vbYesNo, "Confirm Quit")
    4.     If Quit = vbYes Then
    5.         Screen.MousePointer = vbHourglass
    6.         RecordTimeOff
    7.         Screen.MousePointer = vbNormal
    8.         HtmlHelp Me.hwnd, "", HH_CLOSE_ALL, ""
    9.         End
    10.     Else
    11.         Cancel = True
    12.         Exit Sub
    13.     End If
    14.  
    15. End Sub

    The problem I have is that before I get the Msgbox on screen, my MDI form is blanked so all I see is a white background !!

    Really handy if the user says no !!!!

    Any ideas anyone ?
    Last edited by TheBionicOrange; Feb 28th, 2002 at 11:37 AM.

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    maybe throw in a doevents??

  3. #3
    Lively Member
    Join Date
    Jan 2002
    Posts
    76

    Maybe don't do an END

    END really NEVER should be used. Take it out and let the interface do the proper QueryUnload events and etc.

    The END statement can prevent the proper unloading and release of memory.

  4. #4

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818
    OK I took the END out (good point !), and I've tried DoEvents in various places ..... but still blanking form !!!!

    Any more ideas anyone ?

  5. #5

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818
    Excuse the stooopidness

    Got it now

  6. #6
    Lively Member
    Join Date
    Jan 2002
    Posts
    76

    QueryUnload

    Remember that QueryUnload event I talked about....do your MSGBOX there. And use the cancel there. It happens before the unloads

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