Mabry's MouseWheel.OCX crashes using END statement 
Author Message
 Mabry's MouseWheel.OCX crashes using END statement

Mabry Software's MouseWheel OCX crashes whenever it encounters the END
statement in a compiled program.  Mabry doesn't admit this to being a bug.
Instead, they say I shouldn't use the end statement.  The problem is if I
don't, the program won't completely terminate if any printing has been sent
to the printer object.  Anyone have a workaround?


Wed, 09 May 2001 03:00:00 GMT  
 Mabry's MouseWheel.OCX crashes using END statement
Hi Bob:

Quote:
>Mabry Software's MouseWheel OCX crashes whenever it encounters the END
>statement in a compiled program.  Mabry doesn't admit this to being a bug.
>Instead, they say I shouldn't use the end statement.

Mabry is correct! You should not use End to terminate your application.
Using End cause VB to terminate your application immediately, which does not
allow for objects to properly "clean up" after themselves.

To properly terminate your application you must set all object references to
nothing and close all open forms, i.e.

'Main application form
Private Sub Form_Unload(Cancel As Integer)
    Dim frm As frm

    'Set all objects to nothing
    Set mclsWhatever = Nothing
    ...etc

    'Close all open form
    For Each frm In Forms
        Unload frm
    Next frm
End Sub

Note:  If one of the open forms has a Timer, make sure you disable the timer
before unloading the form.

Doug.



Wed, 09 May 2001 03:00:00 GMT  
 Mabry's MouseWheel.OCX crashes using END statement
Hi Bob,

Doug said it all.  End has been a "no-no" since VB4/32.

--
Richard Grier
Hard & Software
12962 West Louisiana Avenue
Lakewood, CO  80228
303-986-2179 (voice)
303-986-3143 (fax)
Author of Visual Basic Programmer's Guide to Serial Communications, 2nd
Edition (355 pages).
For information look on my homepage at
http://ourworld.compuserve.com/homepages/richard_grier.
Use the Books link to order.  For faster service contact the publisher at
http://www.mabry.com.



Wed, 09 May 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Crash when using the End statement

2. END Statement doesn't end program!

3. VB5 crashes when connected using Mabry control to Linux FTP host

4. Expected end of statement - what's wrong?

5. Expected:line number or label or statement or end of statement

6. With...End With statement bombing out in For...Next statement

7. Very simple - How to execute sub statements before the end statement

8. ANN: Mabry's Visual Basic Programmer's Guide to Serial Communications, 3rd Edition

9. Brutal crash when closing form with CR's OCX

10. Multiple Crystal Ocx's causing crashes in NT

11. VB6 crashes when using user created ocx and dll

12. VB6 crashes when using user created ocx and dll

 

 
Powered by phpBB® Forum Software