Make A Little Game - Picture Location

Jan 25, 2010

I was wanting to make a little game. You press a start button, and a picture moves into different spaces. If you can hit stop when the picture is in a certain spot, then you win. How do i make it so when i press the stop button, it will check to see if the picture is in the location (180, 307)?

This is what i have:

CODE:

View 4 Replies


ADVERTISEMENT

Game Programming :: Appear On A Random Location On Another Specified Larger Picture Box?

Jan 13, 2011

I have a picture box and I tell it to appear on a random location on another specified larger picture box.

here's my code:

Code:
Sub P2_AppleMove()
Dim P2ax As Integer = CInt(Int((P2Foodarea.Width * Rnd()))) ' sets the random area of the food

[Code]....

P2foodarea is a large picture box I created. I only want the apple to spawn on P2Foodarea, atm, it spawns on P1Foodarea which is very weird. P1foodarea is a whole other picture box. I even made new variables as you can see P2ax and P2ay, but it still doesn't spawn on P2Foodarea. I have even tried recreating a new picture box for P2foodarea

View 12 Replies

Game Programming :: How To Make A Picture Box Bounce

Dec 19, 2009

Im New To VB and i was wondeing how do you make a picture box bounce from the sides of the form.

View 8 Replies

Game Programming :: Create A Picture Shuffle Game?

Jun 4, 2012

I am all new to Visual Basic 2008, I am trying to create a picture shuffle game, the problem is I cant seem to be able to move one picture from PictureBox1 to PictureBox2 onClick, here is a Code I written earlier:Sub ChangePicture(ByRef P1 As PictureBox, ByRef P2 As PictureBox)

[Code]...

View 1 Replies

Copy A Picture From One Location And Paste It Into Another Location?

May 3, 2012

I'm trying to copy a picture from one location and paste it into another location however VB throws out the following error

Exception from HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED)

both locations are on my local computer. So not sure what is causing the problem.

Here's the code

Module CPASU_SPC
Sub Main()
Console.Title = "MOARW Programs"

[Code]....

View 8 Replies

Game Programming :: Make A Game In VB In Which Character Can Move Around, Jump, And Kill Things?

Apr 2, 2008

im trying to make a game in visual basic in which your character can move around, jump, and kill things. I can get the picture box with the character to move and everything is fine. but i did run into one problem. when the character moves over a tree (or something) you can see the gray backround of the character as i made in paint. how do i make the backround of the picturebox transparent?

View 4 Replies

Game Programming :: Transparant Images - Make A Game Which Basiclly Lets You Shoot Ducks

Feb 1, 2010

I am trying to make a game which basiclly lets you shoot ducks. i have a picture as a background (set as form image) i then have picturebox's with ducks flying flying around you shoot them the disapear etc.

My problem is the image. i have a picture of a duck and a blue square round it. and i would liketo make it transparant because birds dont fly with blue squares.

Below is an image to illistrate my problem

I have tried adding transparent background, transparant key etc

View 2 Replies

Projectile Motion - Make A Game Similar To The Impossible Game?

May 19, 2011

I'm doing a project for school. I'm trying to make a game similar to the Impossible game. I need a square (picturebox) to jump but I want gravity to effect it.

View 1 Replies

Get Location Of An Object / Picture?

Jan 8, 2010

Im trying to get the location of a picturebox on my form or say if location = (20,20) then this happens. The action performed by the picturebox is determined by its location i need some way of monitoring it

View 3 Replies

Possible To Get Location Of Picture By Route?

Apr 23, 2012

i want to get location of all black pixel inside the picturebox like the picture2,3 and 4 belownd here's my code

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b1.Click

[code]......

View 2 Replies

Location Of Mouse Inside Picture Box?

Aug 9, 2009

I researched this and found I had to use something called "ScreenToClient" [URL]...what I want to do is to have a picture box that I can just get the coords from easily (for example 0,0 bottom left hand corner)

So how do I get that to work? (im guessing something like comparing the picturebox size to the form size then working it out but im not quite sure how to do that.)

View 1 Replies

Recognize Mouse Location On Map In Picture Box?

Mar 7, 2012

I have a country map in a picture box with provincial divisions. I can fill each province on mouse over by calling following floodfill function on my pictureBox MouseMove event[code]...

View 1 Replies

Vb2008 Changing Picture Location?

Jul 6, 2009

First of all take a look in here :[URL]...As you can see, in the image there're 3 items.So let's talk about the first one, the first right one. (CRAYON SHORTS)I want the picturebox to move always to the left side,After it knocks the "wall" it'll re-start all the progress.So simply, I want the picturebox to move left.

[Code].

View 3 Replies

Game Programming :: Picture Box Movement Bug?

Dec 30, 2009

Ok, so I'm making a simple breakout game, using picture boxes as I didn't want to bother installing picture boxes.Every movement works perfectly fine; the pad moves correctly, the ball bounces right. Except when I move the pad while the ball is moving.If I move the pad while the ball is moving, the ball moves at the same speed as the pad, which is 10 times the speed of the ball.Well here's the movement code.

Code:
Public Sub Movement(ByVal Movement As String) ' Handles movement
If Not IsPlaying Then Exit Sub

[code]......

View 2 Replies

Game Programming :: Picture Box Not Following Mouse

Dec 15, 2010

I am making a game where a car picture box has to follow a mouse. to start the game you click the car but when i click the car the car moves down away from the cursor. then it starts following the cursor but is still about 2 cm below the cursor and a little to the side.

[code]...

View 3 Replies

Random Picture Generator For A Game?

Feb 18, 2012

i am a complete beginner in VB, I need help for a very simple cards game that I am doing. I need to associate a random picture to a Picturebox every time that I click on a button. I can set the visible property to the picture, but it is always the same picture that shows up, and I would like it to be randomly generated instead, (from a series of card pictures that I have in a folder.)

View 1 Replies

Forms :: Beginner Text Based Game Location Handling?

Mar 18, 2009

I am just for learning purposes trying to develop a one player text based game.

I have a rich text box (GameWindow)
I have a text box (InputWindow)
I have a button (InputButton)
and a bunch of labels that aren't really important

I have two questions first is easy probably. How do i get InputWindow to respond to me hitting enter when text is in it?

[Code]...

But if i plan to have more that is only going to increase the size and code needed and im sure there is an easier way i just don't know how to do it.

View 1 Replies

Getting Pixel Value From A Selected Location In A Picture Box Display

Feb 15, 2010

I am writing a program in VB 2010. My computer is an E Machines dual processor Intel Celeron running at 1.8 gb/sec with 2 GB of RAM. I have a 1680 X 1050 display and the graphics driver in the computer is fully capable of utilizing this display. I am running Vista Home Edition.

The purpose of the program is to analyze a large number of infrared and visible light images from the geostationary satellites GOES East and West. Note: These images are TIFF and range in size from 400 KB to 70 MB. The pixels are either 8 bit or 10 bit depending on the image type.

The program allows the user to select a series of images from a file folder. These images are then displayed in a picturebox. A map covering the same area is also available to the user. The user may then move the cursor, via the mouse, to a selected location on either the map or in a picture. With a left click that location in terms of image coordinates is used to compute the geographic coordinates of the selected location. These coordinates are then displayed for verification purposes. So far, all of this works properly.

The next thing I need to do is to determine the brightness value of selected pixels in the displayed image. Because brightness is related to temperature this permits a detailed examination of cloud temperature and density in each image. By making this measurement at several different wavelengths (provided by images taken at different wavelengths) the program will then compute the atmospheric extinction factor at each selected wavelength and from that derive the atmospheric transparency function.

Here is where I have run into problems. I cannot find a way to extract the pixel value from the selected X, Y values input either by cursor position or by direct entry. I have tried the various approaches described in the documentation but I either get errors or a pixel value that is unrelated to the image. The following is a section of code that I am currently trying.

[Code].....

View 3 Replies

Picture Into Picturebox Based On Pixel Location?

Sep 30, 2009

i have a chart of images.. and i want to load individual images into picturebox from that chart..chart = big image, eg alphabet chart. (yes i am creating a game for my small nephew.. pictures and alphabet) now, i want to show different pieces of images into picture box. like the A box, b Box etc one option is to cut the chart into pieces, save each piece with different filename and load individual filename into picturebox.but i saw somewhere that we can use pixel location to load images into picturebox..as i recall it required two pixel location, 1 was upper left and other was lower right.. and passing that pixel locations would load the rectangular image between those pixel locations into picturebox?

View 9 Replies

Saving A Picture Without Manually Choosing The Location?

Feb 4, 2012

I'm making a screen capturing program, and I am trying to save the image. I can do it as a 'save as' like this

save as
savefiledialog1.Title = "Save File"
savefiledialog1.FileName = "Capture"
savefiledialog1.Filter = "JPEG (*.jpg;*.jpeg;*.jpe;*.jfif)|*.jpg;*.jpeg;*.jpe;*.jfif|PNG (*.png)|*.png"

[code]....

How could I do a quick save option so that it auto saves to a certain location that the user doesn't have to choose and as a .jpg?

View 9 Replies

VS 2008 Placing An Image At A Certain Location In A Picture Box?

Feb 6, 2010

how I loaded my image

Dim test(100) As Image
test(0) = Image.FromFile("C: est.jpg")

now i want to put it in a picture box at location 50-50

View 6 Replies

Game Programming :: 360 Picture Move VB 2005

May 13, 2008

im currently making(or trying) Turbo Tanks from vb Express edition 2005 and I cant get my tank to move a full 360. I can only make it move 90degrees make a object move 360 and btw is it possible to actually make this game from VB 2005 [URL]

View 3 Replies

Game Programming :: Keep Picture Box From Leaving The Form?

Feb 9, 2011

How do I keep my picture box from leaving the form screen and how do I make it 'bounce off the walls" when it hits one edge of the form?

View 4 Replies

Game Programming :: Sound Files - Use .exe On Another Computer It Doesn't Play Because It Does Not Recognize .wav Location

Jan 17, 2010

To programming and have a question with sound files. I am trying to figure out the basics and here is what I did: I created a button that is supposed to play a sound.

My.Computer.Audio.Play("C:.......file.wav")

When I click this button in my .exe file it obviously plays because I am using the computer with the above location for the .wav file. When I use the .exe on another computer it doesn't play because it does not recognize that .wav location. How do I make this work for me? Do I need to embed the .wav with my .exe somehow?

View 4 Replies

Game Programming :: Animating A Picture Boxe's Size?

Feb 19, 2009

I need to make a picturebox, panel animate from a small 25x 25 to 100x 100 in size but cant seem to set the properties right im using a for loop

-----------buttonclickevent------------
dim myx as new point
for i as integer 1 to 50
myx += 2

[code]....

and i get so many errors?

View 3 Replies

Game Programming :: Making A Picture Box Move Right Then Left?

Jan 20, 2011

I want a picbox to move across a screen then back to where it started (for a space invader game:

the following code is what I have for this task.

Code:
Private Sub AlienMovement_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlienMovement.Tick
If Alien1.Location.X > 20 Then

[Code]....

I can't make it < because thats not logical, can't make it = becasue that doesn't work, can't make it > becasue then it will only bounce back once. Is there another variable I could use?

View 5 Replies

Create A Game When Move A Picture Box Around The Form With A Timer Control?

Dec 17, 2009

i am try to create a game when i move a picture box around my form with a timer control i almost done every thing but the problem is avoiding the flikkering effect ?is there any way to avoid it?

View 6 Replies

Game Programming :: Resetting The Locations Of An Array Of Picture Boxes?

May 26, 2011

I have created this code to reset my picture boxes to default locations upon form load.

my sub:

Code:
Sub reset_Alien_locations()
Dim Xlocation As Integer = 26
For segmentIndex As Integer = 0 To AlienArray.Length - 114

[Code]...

I have this sub load up upon form_load event. Yet it doesn't do a thing! I want each picture box to appear on the same row, hence the y axis is set to 49. but I want my X-axis to be added by 30, so that there is a gap of 30 pixels between each picture box, hence the x point is: Xlocation = Xlocation + 30

View 2 Replies

Program That Moves A Picture To Whatever Location User Puts Into Text Boxes

Feb 18, 2011

I have a problem that I can not seem to get. I have a program that moves a picture to what ever location the user puts into the text boxes. It works as I wanted it to but my problem is when a user puts in anything but a number into the text box it gives an error, I want a message to pop up and let them know that a numbers needs to be entered not a text.

View 6 Replies

Game Programming :: Create A Slot Machine Application : User Movable Picture?

May 1, 2010

I am trying to create a slot machine application. I wanted to make a handle like gui so here is what I have:

[URL]

What I want is to be able to let the user drag the red button till a certain point and when they let go of the mouse click the button moves back slowly to the top.Here is what I have so far (I tried my best) :

Private Sub picBall_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picBall.Click
tmrOne.Enabled = True
tmrTwo.Enabled = True

[code].....

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved