Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 86,373 VB Programmers. There are 1,422 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a VB Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Invisible

2 Pages V  1 2 >  
Reply to this topicStart new topic

Invisible

sam_benne
post 7 May, 2008 - 05:36 AM
Post #1


D.I.C Head

Group Icon
Joined: 16 Jan, 2008
Posts: 148



Hi I making a game but I have a small problem as I am wanting to make something invisible. The first thing you would think is use the properties but not the easy as my game picks up an image and places it in a particular spot. However, what I need is for it to make it show one image and when close to it show another. This is some of my code:
CODE

    Case Is = "Z"
        Attack = True
        Opponent = "Suo Clan:"
    End Select

This here is where i need to make it visible but have not got a clue on how i have tried an if statement but that did not work. If anyone has any ideas please tell me thank you.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


xtreampb
post 7 May, 2008 - 06:17 AM
Post #2


New D.I.C Head

*
Joined: 20 Jun, 2007
Posts: 28

have you tried "me.show()" and "me.hide()" yet
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

sam_benne
post 7 May, 2008 - 06:30 AM
Post #3


D.I.C Head

Group Icon
Joined: 16 Jan, 2008
Posts: 148

no i haven't but will try now


This post has been edited by sam_benne: 7 May, 2008 - 06:30 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

xtreampb
post 7 May, 2008 - 06:32 AM
Post #4


New D.I.C Head

*
Joined: 20 Jun, 2007
Posts: 28

be sure to put what you want to show in the parentheses and the same for what you want hidden
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

sam_benne
post 7 May, 2008 - 06:44 AM
Post #5


D.I.C Head

Group Icon
Joined: 16 Jan, 2008
Posts: 148

tried this Me.Hide (ImgNinja.Picture) but does not work
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

xtreampb
post 7 May, 2008 - 06:58 AM
Post #6


New D.I.C Head

*
Joined: 20 Jun, 2007
Posts: 28

QUOTE(sam_benne @ 7 May, 2008 - 08:36 AM) *

Hi I making a game but I have a small problem as I am wanting to make something invisible. The first thing you would think is use the properties but not the easy as my game picks up an image and places it in a particular spot. However, what I need is for it to make it show one image and when close to it show another. This is some of my code:
CODE

    Case Is = "Z"
        Attack = True
        Opponent = "Suo Clan:"
    End Select

This here is where i need to make it visible but have not got a clue on how i have tried an if statement but that did not work. If anyone has any ideas please tell me thank you.


what are you trying to hide here or r u trying to hide and show and when is it susposed to happen. Could i pleese have some more details. could i have a pic of the window

in the even sub try "me.picturebox.hide()" and "me.picturebox.show()"

not sure if anything goes in the parenthese or not

if you wanted to change the picture use
CODE
Me.PictureBox1.Image = My.Resources.Your_picture


This post has been edited by xtreampb: 7 May, 2008 - 07:00 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

sam_benne
post 7 May, 2008 - 08:16 AM
Post #7


D.I.C Head

Group Icon
Joined: 16 Jan, 2008
Posts: 148

i have managed to get it to appear but only after i have done an action but not before which is what i need it to do.
CODE

    Case Is = "Z"
        Attack = True
        Opponent = "Suo Clan:"
        ImgGrass2 = ImgNinja
    End Select

CODE

          Case Is = "Z"
          PaintPicture ImgGrass2.Picture, (X + 3) * 32, (Y + 3) * 32
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Zhalix
post 7 May, 2008 - 12:00 PM
Post #8


New D.I.C Head

*
Joined: 7 May, 2008
Posts: 37

Could you be more specific with what exactly you're doing? I'm really not sure what you're trying to do.

Are you talking about moving around one image, and when that image is close to the second image, the first image changes?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

sam_benne
post 7 May, 2008 - 12:06 PM
Post #9


D.I.C Head

Group Icon
Joined: 16 Jan, 2008
Posts: 148

well what i am doing is when the player gets next to a normal space the image changes.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Zhalix
post 7 May, 2008 - 12:19 PM
Post #10


New D.I.C Head

*
Joined: 7 May, 2008
Posts: 37

Which image changes? The image of the player or the image of the place the player is next to?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

sam_benne
post 7 May, 2008 - 12:20 PM
Post #11


D.I.C Head

Group Icon
Joined: 16 Jan, 2008
Posts: 148

the image of the place that the player is next to
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Zhalix
post 7 May, 2008 - 12:22 PM
Post #12


New D.I.C Head

*
Joined: 7 May, 2008
Posts: 37

Are you moving by the keyboard?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic
Time is now: 5/17/08 02:43AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month