Making A.I So That A Picturebox Moves ?
Jan 20, 2011
How do I make a picture box follow a designated pathway. I have made a game where I have several picture boxes that follow each other. and want on of the trails to be able to do its own course. I have noticed that picturebox.left = picturebox.left + 10 works only for going left but picturebox.right = picturebox.right + 10 it saids read only. so I tried doing minus 10, though i don't know a condition how to do it. like how do it make it turn around when it's 10 from the boarder?
View 13 Replies
ADVERTISEMENT
Jun 30, 2011
When my main form loads it also shows two other forms and has them scroll down from the upper right corner of the screen.
Here's the code for one of them:
Me.Visible = True
Dim x As Integer
Dim y As Integer
[Code].....
View 2 Replies
Aug 10, 2010
I created a custom control that uses a PictureBox and made that PictureBox movable.
I create the control during runtime and the code works just fine. I can move the picturebox, except it can only move within the bounds of the control, which is the same size as the picturebox.
I have a panel that has a label and a picturebox inside of it and I handle the pictureboxes event like so:
[code].....
View 1 Replies
Jan 14, 2010
Hey I am making a GDI++ game in vb.net. Now what I want is the monster(picturebox) to go after the player(picturebox). There Are No Vertical Walls. Only The Edge of map barriers. For example to get to the player the AI would have to go to the end of the ledge and either jump off and fall to the lower ledge or take the ladder down. There is no jumping, only falling and going up and down ladders and across the horizontal ledges. So How Can I make this pathfinding system?
View 18 Replies
Jun 5, 2009
I am making pictureboxes as enemies, and i have a picturebox that that user controls. I want the enemies to move towards the user's picturebox, regardless of their position (Which will be random!).
View 2 Replies
Apr 27, 2012
I am creating a vending machine that has moving items. My issue is making a certain picturebox move left/right to a specified point, then down to the " Item return" label. I'm using a timer to make the items move. I just cant figure out how to get this item to stop then go down then stop again.
After that I'll display a message telling the user the item is ready. How would i get the item I moved to go back to it's original place?
View 3 Replies
Dec 18, 2009
Im setting the standard program to .jpg files to my program. So when it starts it shows the picture in a picturebox ofcourse.
My problems:I want the pictures standard size to be the size of the picturebox.Making the picture open in the picturebox?
View 19 Replies
Nov 22, 2010
I'm doing a pacman game and im stuck on how to make the pellets. This is the code i have so far.I was thinking of maybe making a picturebox for every pellet and then make an if statement that if pacman goes on a pellet it disappears and he gains a point. But this would be a VEERRRYYYY large if statement and im sure there is a better way to do it.
View 3 Replies
Feb 8, 2012
The basis of the program is that the user enters info into to text boxes then hits a button, when the button is clicked and all the parameters are met, the visible property of a rather large picture box becomes true. What I want to do is have the form start off small, just big enough to hold the labels, text boxes and buttons and then resize when the picture box is made visible.
View 2 Replies
Oct 17, 2010
I have a few pictureboxes that move and contain an image of a fish. When they overlap, I would like to be able to see one fish under the other fish.I have made the background (white) of the image transparent in photoshop and the background color of the form seems to show through the background of the fish image, but when 2 fish overlap, ones background covers up the other.
View 1 Replies
Oct 22, 2010
I have a userControl with a picturebox in it. I need the areas of the userControl to be transparent and unclickable on the main form. After some searching Ive come up with this. [URL] but it doesn't seem to work. I have it set up so the usercontrol can be drag-and-dropped. but I dont want transparent areas to be dragable.
View 1 Replies
Jan 18, 2012
how to, if you have two mouses connected and then decect which mouse moves and execute the code. Like:
If Mouse1_Move Then
'code
End If
If Mouse2_Move Then
[code]....
I tried with multiple cursors - but only option is Multipoint SDK - but it can't work on external app and modificating CPNMouse, but i don't know C++?
View 1 Replies
Oct 15, 2011
I want to make a game where the playing pieces can move around. When I click on a playing piece it shows all available moves were I can go like this:
Red represents legal moves and dark gray represents a wall.
I have created a grid and buttons in it. When I click on a button, I subtract or add the available step count to the button index in the grid. For example if my piece can move 3 places, I subtract 3 from the index of the button and get the available position to the left of the piece. Then I do the same for all other directions. It looks something like this:
For each i as button in grid
Select case grid.indexof(i)
Case grid.getindex(currentPlayingPiece) - 3 'Left
[Code]...
Using this method it is very slow and cumbersome to get all available moves and not intuitive to get top and bottom moves. Also if there is a wall in the way and behind there's a available spot it shows that I can move to it.
View 2 Replies
Apr 23, 2010
I am trying to insert a character at the end of a textbox string. The character gets inserted ok but the cursor moves to the beginning at the text. Is there someting I am doing to cause this.
Public
Sub insert_french_char(ByVal
_char As
[Code].....
View 3 Replies
Jan 25, 2009
How do you make a program that moves your cursor to a selected color? So you start the program and then the cursor will auto move to the color red (if that is signified).
View 1 Replies
Apr 2, 2011
I want to make an application that moves all files from 1 zip to another and deletes a folder.
It is a Minecraft mod manager, so i wanna move all files from one zip containing the mod, to the minecraft.jar (which is a zip with another extension) overwriting all files. Also, it should delete the META-INF folder in minecraft.jar to prevent black-screening.
View 3 Replies
May 28, 2011
How do i make a program that moves to a certain co-ordinate, clicks then moves to another co-ordinate and clicks and repeats 5 times?
View 1 Replies
May 28, 2009
In my keydown event handler, I am trapping when an ENTER is pressed and i want to advance to the next tab stop as is it was a TAB presses.I am currently using "SendKeys("{TAB"})" and this works but it is a sloppy way to do buisness, as there may be some typeahead keystrokes in the keyboard buffer.
I have also tried going through the controls collection off the form object, but it is too complicated as i am using containers within containers.Another consideration that TAB processing must be taking into consideration is "what if the tabindex is equal to the current tab stop? what if the next tab stop has tabstop=FALSE or is not enabled or not visible.The sendkeys approach handles all these issues but is a dirty approach and has keyboard buffer event processing quirks.There must be a method off some object somewhere that simply moves the focus to the next tabstop candidate.
View 5 Replies
Oct 14, 2009
I'm trying to make this game, where the button moves to a random location everytime your mouse gets near it.How would i do it?
View 3 Replies
May 19, 2012
I'm new to VB. I'm trying to make some kind of traffic simulation for the school assignment. The problem I have is, that all cars show up as one moving car instead of array of cars moving separately.
[Code]....
View 5 Replies
Sep 29, 2009
I'm creating an app where I don't want to allow the cursor to leave the form, even when the mouse moves.Would it be something to type into pongMain_MouseLeave ? Something like Cursor.Stop () is all I
View 2 Replies
Jun 21, 2010
I'm really a novice and I'm trying to draw a thermometer that moves up or down with temp change. I created a second form on my project for the thermometer and access it using Thermometer.Showdialog((). Then on the thermometer form, I'm using this code:
Private Sub ThermometerForm_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim g As Graphics = e.Graphics
[Code].....
It works great and shows the red moving up though the rectangle. Problem is that when it's finished the loop (33 seconds) and I click anywhere on the form it apparently enters the loop again, then hangs so I have to manually close it from Windows.
View 2 Replies
Jul 7, 2010
I have a VB .NET form with a splitter control on it, and I want to save its position between program runs. I am currently handling the SplitterMoved event and storing the SplitterDistance. Then on program startup, I set the SplitterDistance to the saved value.
However, sometimes the program resizes the splitter, raising the SplitterMoved event and overwriting my saved distance. I have several splitters over multiple tabs in a tab control, and any time the user goes to a new tab for the first time, the SplitterMoved event fires.Is there an event I can use that will only fire when the user moves the splitter, and not when the program moves the splitter? I tried MouseUp, but when that event fires, the new SplitterDistance is not yet set.
View 2 Replies
Oct 22, 2010
I'm working on an application to write reports for the work I do. I have a Grid filled with Textboxes inside a Scrollviewer to input data for the report. I am using the arrow keys to navigate around the grid. The focus moves to the expected Textbox when the arrow keys are pressed but if I press any other key it is immediately followed by a Tab to the next Textbox. Even a Tab is followed by another Tab. Following is the code I use for the navigation.
Private Sub svReportPage_KeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Input.KeyEventArgs) Handles svReportPage.KeyUp
Dim focusDirection As FocusNavigationDirection
If e.Key = Key.Right Then focusDirection = FocusNavigationDirection.Right
If e.Key = Key.Left Then focusDirection = FocusNavigationDirection.Left
[Code] .....
View 3 Replies
Jul 20, 2009
I am writing a Class Library for a GIS Windows application. The class has a form that I open when I load the dll command in the application. After the form opens the form moves to the back of the GIS Windows application, and I want it to be in front of the GIS Windows application all the time. How can I do this?
View 1 Replies
Mar 31, 2012
How can I make a progress bar move according to how long it takes for a webpage to open in a web browser?
View 3 Replies
Nov 3, 2011
I just started tryign to make a program that when you click on buttons un one form it moves a label in another form.
Hers are the codes i have.
Mover is the form when the moving buttons
Code:
View 7 Replies
Aug 30, 2009
I can't tell why when my picture box is to show an image the picture box moves altogether, I feel like it might be moving toward the checkbox which I have controlling the visibility of my picture box. That check box doesn't work as it is supposed to either. Everything else works just fine.
[Code]...
View 1 Replies
Nov 6, 2009
I have a timer, named timer7, which adds items to my listview, named listview2
what i want to do is stop timer7 anytime the mouse is over listview
and then restart timer7 if the mouse is not over the listview2
View 6 Replies
Mar 4, 2009
Basicly If a user clicks on a picture box it moves around with the mouse, How can I make it so the user has to be holding down mouse1 (draging the picture box) and if they are not holding down mouse1 it drops
View 3 Replies