vbÖÐÈçºÎÑÓ³Ùʱ¼ä£¬³ÌÐòÔËÐе½Ò»¶Î´úÂ룬ͣ¶Ù5Ã룬Ȼºó¼ÌÐøÍùÏÂÔËÐÐPrivate Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) DoEvents Sleep 5000
Option Explicit Private Declare Function GetTickCount Lib "kernel32" () As Long Dim StartTm&
Private Sub Command1_Click() Call DataSend(&H67, MSComm1) Call DelayCycle(1000) Call DataSend(&H6A, MSComm1) Call DelayCycle(1000) End Sub
Public Sub DelayCycle(Optional Dtm As Long) On Error Resume Next StartTm = GetTickCount Do DoEvents Loop Until GetTickCount >= StartTm + Dtm End Sub
ÎÒÓÃÕâ¸ö³öÏÖ´íÎó VB code:
Dim NowTime As Date Dim IsExit As Boolean MsgBox "¿ªÊ¼µÈ´ý5Ãë" NowTime = Now IsExit = False Do DoEvents If DateDiff("s", NowTime, Now) >= 5 Then IsExit = True Loop While IsExit = False MsgBox "Òѵȴý5Ãë"
VBÔõÑù»ñµÃÊó±ê´¦µÄ³¬¼¶Á¬½ÓÄØ£¿ ÔÚWebBrowser¿Ø¼þÖÐÓÐÕâÑùÒ»¸öʼþ:StatusTextChange(index As Integer, ByVal Text As String) ËüµÄText²ÎÊýÕýÊÇÊó±ê´¦µÄ³¬¼¶Á¬½Ó,µ«ÎÊÌâÊÇÈç¹ûÎÒµÄä¯ÀÀÆ÷Õýà ......