|
-
Apr 3rd, 2000, 09:21 PM
#1
Thread Starter
New Member
I have a form with a picture box and a counter. While the counter is running, the picture flutters. Any idea how I can prevent the picture from constantly fluttering? Thanks!
-
Apr 3rd, 2000, 11:02 PM
#2
Addicted Member
Start new Project; put a Picture box; timer;label and command button on form: Set the label's name to lblCounter;
set the command button's name to btnExit: User the following
code:
Code:
Option Explicit
Dim C As Double
Private Sub btnExit_Click()
Unload Me
End Sub
Private Sub Form_Load()
btnExit.Visible = False
C = Now
End Sub
Private Sub Timer1_Timer()
' Display timer for 10 seconds. After 10 seconds
' Exit button is displayed.
Const TM_STOP = 10 'Changing this number will change the length of time a screen stays up.
lblCounter = Format$(Now - C, "ss")
If Val(Format$(Now - C, "ss")) >= TM_STOP Then
End If
End Sub
-
Apr 3rd, 2000, 11:12 PM
#3
Addicted Member
Sorry, I left out a couple of lines of code in my reply
After:If Val(Format$(Now - C, "ss")) >= TM_STOP Then
Add the following two lines
Timer1.Enabled = False
btnExit.Visible = True
So the Timer1 sub should be as follows:
Private Sub Timer1_Timer()
' Display timer for 10 seconds. After 10 seconds
' Exit button is displayed.
Const TM_STOP = 10 'Changing this number will change the length of time a screen stays up.
lblCounter = Format$(Now - C, "ss")
If Val(Format$(Now - C, "ss")) >= TM_STOP Then
Timer1.Enabled = False
btnExit.Visible = True
End If
End Sub
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
|