Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a timer control on my form and I whant 2 actions each 2 seconds

 

for example :

 

start form > picturebox1.picture = "image1"

 

after 2 sec. :picturebox1.picture = "image2"

 

after 2 sec. picturebox1.picture = "image1"

 

after 2 sec. picturebox1.picture = "image2"

 

etc...

 

I have a slution ..but is a little complicated.Must be a simple way to do that.

 

thanks

Posted

In your timer event code do something like:

 


If picture1.picture = "image1" then

  picture1.picture = "image2"

else

  picture1.picture = "image1"

end if

My website
  • *Experts*
Posted
No need for the picture1.picture = "image1" after the Else statement :)

There is because if the image was not "image1" then it wouldnt change anymore. The Else checks if there is anything else in there, in this case "image2" so it can set "image1" again as needed.

:)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...