|
-
Sep 12th, 2000, 07:41 AM
#1
Thread Starter
Hyperactive Member
This is my prob, i have a form running throughout the whole program. This form has a timer with the interval of 1000 (1sec). If it sees a form, i would like it to wait 5 seconds before it closes it. Now i dont want it ot call another timer to close it so is there any other way?
-RaY
VB .Net 2010 (Ultimate)
-
Sep 12th, 2000, 07:46 AM
#2
Member
Sleepppppp....
You could use the sleep function
(but again, i think it's only in VB6)
Code
Private Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
Call Sleep(5000) '5 seconds
End
-
Sep 12th, 2000, 07:52 AM
#3
Thread Starter
Hyperactive Member
;o\
Yeah vb doesnt have the sleep function, plus i want everything else to be working. I just want 1 form to close in 5 seconds. I guess im going to have to use another timer.....EEKKK
-RaY
VB .Net 2010 (Ultimate)
-
Sep 12th, 2000, 07:55 AM
#4
_______
<?>
could you not do something like this.
wherever you find the window open
Timer2.interval = 1000
Timer2.enabled=true
x = x + 1
if x = 5 then
'close the window
x = 0
timer2.enabled = false
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 12th, 2000, 08:05 AM
#5
transcendental analytic
You could have a counter counting the seconds in the timer
Code:
Static counter as integer
'to activate it counter=counter+1
if counter then counter=counter+1 'increments if activated
if counter=6 then '5 seconds passed
'do your stuff
counter=0'disable the counter
end if
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|