Results 1 to 2 of 2

Thread: ** RESOLVED ** Program Crashing when closing wih Win2000 ?!!

  1. #1

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

    Exclamation ** RESOLVED ** Program Crashing when closing wih Win2000 ?!!

    Morning All.

    I have a bizarre problem.

    I am now the proud owner of a shiny new PC, which is nice !

    Unfortunately, I am experiencing a few 'weird' things now that I have moved up to Windows 2000 Professional.

    My app, which under Windows 98 worked fine, now crashes when I click a toolbar button to close it.

    The code behind the button is "Unload Me", and then it performs the code below for the unload of the MDI master form.

    Even more bizarrly, if I step thru in debug mode it doesn't crash, only when I run it normally !!!!

    This happens EVERY time as well.

    Can anyone give me an idea why this might be ?

    Thanks.

    Steve.


    VB Code:
    1. Private Sub MDIForm_Unload(Cancel As Integer)
    2.    
    3.     Screen.MousePointer = vbHourglass
    4.     #If live = 1 Then
    5.         RecordTimeOff
    6.     #End If
    7.     HtmlHelp Me.hwnd, "", HH_CLOSE_ALL, ""
    8.     Screen.MousePointer = vbNormal
    9.    
    10.     ' Set all connection variables to nothing here to close down cleanly
    11.     Set conndll = Nothing
    12.     Set conn = Nothing
    13.     End
    14. End Sub
    Last edited by TheBionicOrange; Aug 19th, 2002 at 03:41 AM.

  2. #2

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818
    OK I fixed it.

    I shoved a 'DoEvents' in before the 'End' statement and it now works fine.

    I presume this must be a timing issue !

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