Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can I use delay between 2 operation in VB6

Status
Not open for further replies.

xanseviera

Junior Member level 3
Joined
Jun 22, 2010
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,434
delay in VB6

how to put delay inside VB?
i want to make delay between 2 operation.
i try it before using "Sleep(3000)", but it need declaration... sum1 help me.
 

Re: delay in VB6

xanseviera said:
how to put delay inside VB?
i want to make delay between 2 operation.
i try it before using "Sleep(3000)", but it need declaration... sum1 help me.

declaration is as below

Code:
Private Declare Sub Sleep Lib "Kernel32.dll" (ByVal dwMilliseconds As Long)

also you may try this
**broken link removed**
 

Re: delay in VB6

if let say i want to put delay here(arrow):

Code:
LampuMati
tmrLampu.Interval = Val(txtHijau(Index).Text) * 1000
LampuHijauNyala Index
'delay <------------ want to put delay here.
For intNum = 0 To 3
    If intNum <> Index Then LampuMerahNyala intNum
       Next
       intLampu = 1

how the delay will be?
TQ
 

Re: delay in VB6

insert "Private Declare Sub Sleep Lib "Kernel32.dll" (ByVal dwMilliseconds As Long)" top of your form (code window)

then try below

Code:
LampuMati
tmrLampu.Interval = Val(txtHijau(Index).Text) * 1000
LampuHijauNyala Index

'delay <------------ want to put delay here.
call Sleep(5000)

'or

Call Wait(5000) ' Wait for 5 seconds as given example

For intNum = 0 To 3
    If intNum <> Index Then LampuMerahNyala intNum
       Next
       intLampu = 1
 

TQ for da codes..
it work for me... ;)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top