hello !!! i am new in VB
the program below is onli small part ,, at the moment i only want to put it into do while loop which can be stop using any keyboard button
is there any way i acn do it ???
thankxxxxxx
[CODE=vb]While (temp_time >= 0)
T1 = Timer
DT = 0
Stop_async1 = 0
Half_ready = 0
While (Half_ready = 0) 'And (Stop_async1 = 0)
result = D2K_AI_AsyncDbl BufferHalfReady (Card_number, Half_ready, Stop_async1)
If result < 0 Then
box = MsgBox("ERROR", vbYesNo)
End If
Wend
result = D2K_AI_AsyncDbl BufferToFile(Ca rd_number)
'While (Stop_async1 = 0)
' result = D2K_AI_AsyncChe ck(Card_number, Stop_async1, Access_count)
'Wend
'result = D2K_AI_AsyncCle ar(Card_number, 0, Access_count)
T2 = Timer
DT = T2 - T1
temp_time = temp_time - DT
DT_temp = DT_temp + DT
If DT_temp >= 1 Then
DT_temp = 0
Info_Label.Capt ion = "Remained time: " + Str$(temp_time) + " sec."
END IF
Wend[/CODE]
the program below is onli small part ,, at the moment i only want to put it into do while loop which can be stop using any keyboard button
is there any way i acn do it ???
thankxxxxxx
[CODE=vb]While (temp_time >= 0)
T1 = Timer
DT = 0
Stop_async1 = 0
Half_ready = 0
While (Half_ready = 0) 'And (Stop_async1 = 0)
result = D2K_AI_AsyncDbl BufferHalfReady (Card_number, Half_ready, Stop_async1)
If result < 0 Then
box = MsgBox("ERROR", vbYesNo)
End If
Wend
result = D2K_AI_AsyncDbl BufferToFile(Ca rd_number)
'While (Stop_async1 = 0)
' result = D2K_AI_AsyncChe ck(Card_number, Stop_async1, Access_count)
'Wend
'result = D2K_AI_AsyncCle ar(Card_number, 0, Access_count)
T2 = Timer
DT = T2 - T1
temp_time = temp_time - DT
DT_temp = DT_temp + DT
If DT_temp >= 1 Then
DT_temp = 0
Info_Label.Capt ion = "Remained time: " + Str$(temp_time) + " sec."
END IF
Wend[/CODE]
Comment