Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,062 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,752 people online right now. Registration is fast and FREE... Join Now!




vb graphics

 
Reply to this topicStart new topic

vb graphics, switching graphics in vb

bbynitemre
3 Feb, 2008 - 09:46 AM
Post #1

New D.I.C Head
*

Joined: 3 Feb, 2008
Posts: 3

I have to create a tic tac toe game with 3 graphics (1 for unselected, 1 for X, and 1 for O). I am using the picture box and added the image when you run the program you cannot click on the picture. What is the property that allows a user to click on a picture box when you run your program?
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Vb Graphics
3 Feb, 2008 - 09:49 AM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Is this VB6 or some other version of Visual Basic (2003, 2005, 2008?)?
User is offlineProfile CardPM
+Quote Post

bbynitemre
RE: Vb Graphics
3 Feb, 2008 - 09:52 AM
Post #3

New D.I.C Head
*

Joined: 3 Feb, 2008
Posts: 3

QUOTE(PsychoCoder @ 3 Feb, 2008 - 10:49 AM) *

Is this VB6 or some other version of Visual Basic (2003, 2005, 2008?)?


This is vb 2005
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Vb Graphics
3 Feb, 2008 - 09:54 AM
Post #4

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Ok, I am moving this to the VB.Net Forum as 2005 is VB.Net.

Also, read up on the PictureBox Control and take a look at its Properties, Members, Events and Methods.

Hope this helps & happy programming smile.gif
User is offlineProfile CardPM
+Quote Post

bbynitemre
RE: Vb Graphics
3 Feb, 2008 - 12:16 PM
Post #5

New D.I.C Head
*

Joined: 3 Feb, 2008
Posts: 3

QUOTE(PsychoCoder @ 3 Feb, 2008 - 10:54 AM) *

Ok, I am moving this to the VB.Net Forum as 2005 is VB.Net.

Also, read up on the PictureBox Control and take a look at its Properties, Members, Events and Methods.

Hope this helps & happy programming smile.gif


I looked at the link above and am still unsure which property will make the picture box have the ablity to click for the user when the program runs.
User is offlineProfile CardPM
+Quote Post

Schmit38
RE: Vb Graphics
3 Feb, 2008 - 01:06 PM
Post #6

New D.I.C Head
*

Joined: 21 Dec, 2007
Posts: 26



Thanked: 1 times
My Contributions

In the vb.net form designer , just double click on the picture box and it creates this code:


CODE
  Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click

    End Sub


put the event code inside this sub.
User is offlineProfile CardPM
+Quote Post

TNT
RE: Vb Graphics
3 Feb, 2008 - 04:10 PM
Post #7

New D.I.C Head
*

Joined: 3 Feb, 2008
Posts: 7

QUOTE(bbynitemre @ 3 Feb, 2008 - 10:46 AM) *

I have to create a tic tac toe game with 3 graphics (1 for unselected, 1 for X, and 1 for O). I am using the picture box and added the image when you run the program you cannot click on the picture. What is the property that allows a user to click on a picture box when you run your program?



I believe that what Schmidt38 suggested to in vb.net also works in Visual Basic 5 (which I have) and probably version 6. When you are creating the form with the various picture boxes, just double-click on the picturebox you want to write code for and the program will create the subroutine where you can put the code that you want to accomplish when you do the double-click on the picture box.

(It's probably in the manual)

Good luck.


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 10:38PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month