Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Exam question

Status
Not open for further replies.

Huitzilopochtli

Programmer
Feb 18, 2002
81
DE
Hello

I would be grateful if somebody - anybody! - could help me with an exam question I am trying to prepare for.

On my form I have an image box in which there is a timer (set to 2000 in properties). Next to the image box I have a label with 'visible' disabled in properties.

The idea is for the user to click on the image box (there is no image in it) and for this to trigger the label appearing for 2 secs.

Any help would be appreciated.

Yours

Huitzilopochtli
 
Well, make the following settings in the Form_Load-Event:
Timer.Enabled = False
Timer.Interval = 2000
Label.Visible = False

Then build an "OnClick"-Event for the ImageBox where you set:
Timer.Enabled = True
Label.Visible = True

Finally you need an Timer_Timer-Event where you set:
Timer.Enabled = False
Label.Visible = False
 
Hello SamNickname

That was quick.

I'll try it! Hope it works fine!

Many thanks for your time, Sam!

 
Try this:

Before you start set: label1.visible = false
Timer1.enabled = false

Private sub Picture1_Click()
Label1.visible = true
Timer1.enabled = true
end sub

Private sub Timer1.Timer()
Label1.visible = false
Timer1.enables = false
end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top