Mouse events causing overflow error? 
Author Message
 Mouse events causing overflow error?

Has anyone experienced this problem?  I'm running my VB 4.0 application
which makes frequent calls to routines in a DLL (written in C).  The
calls to these routines can take a few minutes to complete.  On some of
the longer calls, I get this VB error message:

          run-time error'6'

An example of what I am doing is listed below.  When my long-running DLL
routine is running, my application is still processing the
Form_MouseMove events.  When the DLL routine is done, I press the left
button and begin to move the mouse, and then I immediately get the above
mentioned error.  When I press the "debug" button on the Error dialog
box, it seems to point to the "(xold - x) > 0!" statement in my
Form_MouseMove() routine.  Checking the values of xold and x show no
sign of overflow.

What gives?  xold, yold, x and y are all single variables, so I don't
see any  possible overflow problems.  I don't want to disable the form
input to prevent the mouse input during the DLL routine execution.... is
there a way to turn off mouseMove events to the form window?

Any suggestions would be greatly appreciated!!

Thank you,


dim xold as single, yold as single

private sub button1_click ( )


  ' This DLL routine takes a few minutes to finish

  call Takes_a_long_time_routine

end sub


Private Sub Form_MouseMove (Button As Integer, Shift As Integer, x As
Single, y As Single)

  If Button = 1 Then
       If ((xold - x) > 0!) Then
           Call G_view_rotate_X_axis(5#)
           Call G_view_rotate_X_axis(-5#)
       End If

       If ((yold - y) > 0!) Then
           Call G_view_rotate_Y_axis(5#)
           Call G_view_rotate_Y_axis(-5#)
       End If
    End If

  xold = x
  yold = y

  Call OGL_window_paint

End Sub

Sun, 27 Dec 1998 03:00:00 GMT  
 Mouse events causing overflow error?

>Has anyone experienced this problem?


VB Info:
Knowledge Base:

Mon, 28 Dec 1998 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Cause of error (error 6 overflow) in Windows 2000

2. Overflow in mouse events?

3. PEGetWindowHandle Cause a Overflow error ?

4. runtime errors due to events overflow?

5. overflow errors with MouseMove Events

6. OnClick Event on a button in the placeholder causing Error

7. OnClick Event on a button in the placeholder causing Error

8. Event fired in a thread cause error

9. Dereferencing out of process server object causes exception error when using events

10. Multiline Textbox Cause Page Overflows when Printing or doesn't print all lines

11. Why does this cause an overflow?

12. User Control causes stack overflow


Powered by phpBB® Forum Software