Hello Guest it is April 28, 2024, 11:11:36 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - mvcalypso

Pages: « 1 2
11
VB and the development of wizards / mach vs VB sleep call problem?
« on: November 08, 2007, 10:57:33 PM »
Hi -
Within my M6 macro is the following code:

Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)

Sub MachWait
While IsMoving()
Sleep 100
Wend
End Sub

I call MachWait from various spots within the M6 macro when I need to wait.

I think this used to work ok (as far as I know). I wrote the macro
around verion 2.46 & have been using it since. Recently I updated to
r2.56. While running a job this eve I got multiple VB errors from mach on
the "sleep 100" line.

Sorry, I did not write down the error verbatim and now can't
remember the wording. This may have been happeing all along and
maybe I didn't notice... the error dialog box does not come to the
front - so the error dialog lurks behind mach and I don't see it
when it happens... I only noticed this eve as I saw an extra task in
the task bar and found the dialog box.

I thought the sleep call was good form to keep from locking up the
CPU in the wait loop... is there a problem to find here or should I
just delete the sleep 100 call?

Dave


Pages: « 1 2