Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tic tac toe game...image as buttons
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00568313
Message ID:
00568336
Views:
18
>hello, this is my first post as ive just joined to day. thank you for replying.
>im very new as you can tell by my question its not advanced stuff. anyway here's my (small) problem.
>
>i made a tic tic toe game and it works fine but i dont want to use the buttons.
>id like to just use an image and when clicked, a LoadPicture will load a pic of an X or an O....
>
>my problem is i dont know how to test wether an image has been clicked.
>when i used the regular buttons i had a caption of an X or O on it so it was easy. example .. if button(0).caption and button(1).caption and button(2).caption = X
> then game is over
>....and it worked fine.
>
>but how do i test an image? this is how im doing it and it doesnt work.
>
> if image(0).picture = x.jpg AND image(1).picture = x.jpg AND image(0).picture = x.jpg
> THEN game is over
>(the above code is somewhat pseudo code but the important lines are the image lines )
> how do i test if an image has been loaded?

Use the Tag property to store a value which will tell you if the loaded picture is O or X.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform