Using An Inputbox To Move A Picture?

Mar 1, 2009

I need to use an inputbox to move a picture.I need to it using buttons left,rigt,down and up when I press the buttons an inputbox needs to appear there i need to insert the number of units to move the picture and the the number of times that the picture will move.Private Sub Command2_Click()j = InputBox("type a number:", "type units to move", "type")Picture1.Left = Picture1.Left + x1If (Picture1.Left >= Form1.ScaleWidth - Picture1.Width Or Picture1.Left <= 100) Then x1 = -x1 End IfEnd Subthis is an example that i tried to do

View 2 Replies


ADVERTISEMENT

Move The Picture In Picture Box Or Label?

Feb 25, 2009

[Code]...

How can i move the picture in picture box or label to the right..im using the code above and my lable was moving to the left.

View 1 Replies

FLAG And InputBox - Display An InputBox For Each Word?

Jun 22, 2010

I have an assignment that asks me to:

1. create a button
2. when that button is clicked, an inputBox will appear to ask the user how many words they will enter.
3. then display an inputBox for each word.

For example, when the first inputBox appears, I enter "3" (meaning that I will enter 3 words).Then there should be 3 more inputBox (each inputBox allows me to enter only 1 word)After I enter the third word, there will be no more inputBox.How can we FLAG (stop) the inputBox, or let the inputBox know when to stop showing up?

View 1 Replies

Can't Move The Picture At All

Feb 10, 2012

I tried to make a simple game with a picture just moving to the goal. However, I can't move the picture at all.

Here's the code
Public Class Form1
Public Event Up As KeyEventHandler
Private Sub PictureBox1_KeyUp(ByVal sender As Object, ByVal e As

[Code]......

(Note: I first gonna make the picture box move b4 I make the rest of the code)

View 5 Replies

Move A Picture Diagonally?

Mar 4, 2009

Im trying to move a picture diagonally when I click a button but the code Ive been trying to put together isnt working, could you pales tell me how im doing wrong

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim i As Integer
i = PictureBox3.Location.X
Dim o As Integer
i = PictureBox3.Location.Y
PictureBox3.Location = New Point(i + 1, o + 1)
End Sub

View 3 Replies

Move A Picture With Timer?

Nov 27, 2009

I create my fisrt game for a school project, it's a music game very simple and fun. We have a picture of a guitar, a song that play in background and we need to shoot some picture of note in the right time.My problem is that I don't understand how to move the picturebox by itself. I have doing this code and that don't work.

Dim intX As Integer
Dim intLargeurFeuille As Integer = Me.Width
Dim intLargeurImage As Integer = picNote.Width

[code]...

I want to make move a sequence of note, i have begin for just one but that not great. I want to, when in a specific moment of the song that paying, to make move a group of note. Also, the group of note need to move to a place in a specific time.

So what I need is

- Move note to a place in a specific time
- Begin the movement of the note at a specific time.
- The note move only on the X, to right to left

View 8 Replies

Use Picture Box To Move The Form?

Jul 29, 2009

how to use a picture box to move a form? For example, I have an application that is borderless, that can be moved using the winproc method but what I am attempting to do is make a drag handle of some kind. I have a nice little image and now I just need to figure out how make the form move around the screen when the user clicks and holds on this picture box.

View 8 Replies

VBS User Move Picture?

Jun 11, 2012

I have a picture box that has an image in it. I want the user to be able to drag and move around the picture and place it where they want it. I have been playing around with the Imagelist but I cant seem to understand how to select different images from it. I want the user to select an image and drag it somewere on the screen. then be able to select the same or even a different image and place it some were.

View 3 Replies

How To Draw Rectangle On Picture And Move Around

Nov 9, 2010

I want to Draw an Rectangle on a PictureBox and after that I must be able to move this Rectangle around. I have made now that I can draw a Rectangle on a Picturebox via MouseDown and MouseMove Events, but I dont know how to Move the Rectangle.

Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
Try
If e.Button = MouseButtons.Left Then
cropX = e.X
cropY = e.Y
[Code] .....

View 1 Replies

Move A Picture Box With Arrow Keys?

Oct 10, 2010

I have been trying to figure this out all night, so I figures it's time to ask you guys.

I can't figure out how to make a picture box move when a key is pressed. It works fine if I use a button.[code]...

View 9 Replies

Forms :: Move A Picture Box According To A Result (Calculator)?

Oct 28, 2011

Ive made a calculator that estimates how high a model rocket will go. I was intending on making a simulation that will show you visually how high it will go. (Little rocket image goes up and stops at estimated hight) I know how to make a picture box move and everything, but i can only make it move to a set distance.

View 3 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

Got A Picture Box To Move On Keypress Of My Directional Button

Jun 11, 2012

i am new to Visual Basic so please bare with me, i have currently got a picture box to move on the keypress of my directional buttons.this is great however i want to take it a little bit further, i want my picture box to change depending on the button thats pressed.i know that i need to use a imagelist, but after a few hours of bashing my head against the computer i cannot get the code to play ball

View 14 Replies

Move A Picture Using Arrow Keys Press?

Feb 2, 2010

How do i make it so when an arrow key is pressed, it will move a picture in that direction?

View 2 Replies

VS 2008 Find A Picture And Then Move Mouse To It?

Mar 28, 2012

i was wondering if i can make it so when you click a button that it does the following:

Click Button:

1.Looks inside a certain area to find a picture

2.If picture/image/icon found, then

3.Move the mouse over the picture/image/icon

4.Click mouse

View 20 Replies

VS 2008 Make Picture Box Move Along The Path?

Jun 24, 2009

As seen below in the screenshot I used the following code to draw a line from CA to CA 1.1

g = pbxMap.CreateGraphics
g.DrawLine(pen1, D.v(path(t)).x, D.v(path(t)).y, D.v(path(K)).x, D.v(path(K)).y)

Is there anyway to make the red picturebox at CA to move along the line drawn to CA 1.1? Something like the google driving directions where a car will moving along the path from a starting point to a ending point..

View 8 Replies

VS 2008 Move A Picture Box With The Arrow Keys + More?

Mar 27, 2010

I need to be able to move it up with the up arrow key, down with the down arrow key, left with the left arrow key, and right with the right arrow key.I know my "Player" works by the way:

Private Sub PlayerPic_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlayerPic.Click
MsgBox("test")

[code].....

View 3 Replies

VS 2008 Picture Box Mouse Move Event

May 25, 2011

In my project's Main form I have a picture box of size 1024*1024 which occupies almost 75% of my monitor screen. Now I have defined Picture box Mouse movement event with corresponding actions to be done for mouse mouse event over picture box. Now the problem is I have another button on my main form by pressing which an another form of size 520*170 pops up. I have set Me.Topmost property to this form. But even then if by I hover the mouse over picture box, this pop up form disappears (i.e. goes to back screen) and if at all i have to perform any action on this form I need click the Tab of the popped window on the task bar which makes this form visible. Worst case is if the user drags this form on top of the picture box and looses focus, then its impossible to get it(focus) back.

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

Select A Picture Box And Make It Move With A Mouse Click?

Oct 7, 2010

I'm making a game and I want to select a picturebox while the program is running. Then I want to make it move with I think the mouse click event. How do I go about doing this?

View 2 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

InputBox - Code To "read" Commands That Are Placed From The Inputbox?

Mar 9, 2011

Quick question on the InputBox. I am just learning this, what is the code to "read" commands that are placed from the Inputbox? I can do this in the command line: System.Console.Writeline(), System.console.Readline()

I just would like to know how read the line from the inputbox. Also when I debug my script do I -always- need to have the command prompt in the background?

View 1 Replies

PicBox Mover - If The Picture Is In The Top Left Corner - It Will Move To The Center, Then To The Top Right Corner

Nov 4, 2009

Clicking on the picture will cause the picture to move in the following manner: * If the picture is in the top left corner, it will move to the center, then to the top right corner * If the picture is in the top right corner, it will move to the center, then to the lower right corner * If the picture is in the bottom right corner, it will move to the center, then to the bottom left corner * If the picture is in the bottom left corner, it will move to the center, then to the top left corner

[Code]...

View 17 Replies

Use The Top Of The Picture In "PictureBox1" To Move The Form?

Sep 15, 2011

I need someone to teach me how I can use the top of the picture in "PictureBox1" to move the form (or program) around. I have BTW, removed the form "edge" or "border". I'm using VB 2010.

View 11 Replies

Move - Xcopy Equivlent - Copy And Move The Entire Contents Of A Directory To Another

Jan 6, 2012

how do i copy and move the entier contents of a directory to another ussing VB.net then also delete the files from there original directory?

View 1 Replies

Listboxes In Array: Move To Next Item, And Move To Next Listbox Command?

Dec 26, 2009

I have three listboxes in an array and on form_load the listboxes initially select the fifth item in each listbox:

Private Sub frmSample_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For i As Integer = 1 To 3

View 8 Replies

Keep My Inputbox Up?

Mar 3, 2010

Heres my code under the console application[code]...

How do I keep the inputbox up until the user guesses the right answer?

View 1 Replies

Add Input In A InputBox?

May 22, 2010

i'm making a multi-line text box, i need somone to add input in a InputBox, and it to write it to a setting (My.settings) but, i need each input to start with a new line, i've tried chr(10) + chr(13), but nothing works!

View 3 Replies

InputBox Is Empty?

Mar 20, 2009

[code]......If someone leaves the txt2 empty.... and they click the button how can I pull up another inputbox like for <= 0?

View 3 Replies

Inputbox Without A Title?

Nov 5, 2010

How do you make an Inputbox without a title?

I know you can do it this way:

inputbox("Please answer a question", " ", "")

This way you put a space in the Title property.

But is there another way to do this without putting a space in the Title property?

Maybe there is an inputbox without a title in vb.net?

View 2 Replies







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