Moving A Picturebox Without Knowing Its Exact Name?
Feb 3, 2012
What happens to create the car is the user selects which car he/she wants to create from a combobox and then they press a button to create it.Private Sub btnCreateCar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateCar.Click
If cbCarSelect.Text.Contains("Ferrari") Then
c = 1
pictureboxesFerarri(c) = New PictureBox
[code]....
View 3 Replies
ADVERTISEMENT
Aug 17, 2011
is there a way in vb.net to open microsoft outlook without knowing the file path exactly? different versions of outlook use different file locations, then you have to worry about the program files and program files(x86). is there a way to just launch outlook using the system.diagnostics.process.start("..") without the file path?
i dont want to have to test folders:
If Folder_Exists("C:Program FilesMicrosoft OfficeOffice12") Then
If Folder_Exists("C:Program FilesMicrosoft OfficeOffice11") Then
View 3 Replies
Oct 12, 2010
i was wondering i have a picture box which is controlld by the keyboard, and the picture is able to leave the form. i was wondering how to stop it leaving the form without knowing the exact size of the form and using multiple points on the edge of the form.
View 3 Replies
Nov 20, 2009
(Visual Basic .NET 2003) I am trying to move a picturebox up and then down on my form. The Picturebox moves up but does not move down. The motion is more of a bouncing motion (to the left) until it disappears off the screen. I have one button and one timer. I know this is probably so simple, but I cannot resolve the problem
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
[CODE]...
View 2 Replies
Oct 27, 2011
I'm trying to move an image on a picturebox, but I'm getting a error which I don't understand. my
[Code]...
View 3 Replies
Sep 17, 2009
how do i "drag and drop a picturebox" on a form drag and drop is used in vb.net for moving a picture by mousedown
View 11 Replies
Oct 12, 2007
Okay, so just wondering, if its possible. I Have a picturebox (PictureBox1) and just wondering if I dragged the picturebox how could i drag the form?
View 5 Replies
Jan 22, 2011
I'm working on a little board game we play here in Jamaica just to see how it would look and as a sort of challenge for myself while on vacation. I'm however stuck on how to make my markers (PictureBoxes - two per player) move along the board.So heres my problem; I have 40 slots where the picturebox can be moved to (eg picturebox1.Top = 324, picturebox1.left=243). Now moving to these slots are determined by the roll of a pair of dice. How can I assign a variable preferably an integer for each slot so when the dice is rolled I can just do a little addition as to where the markers can be moved?
View 7 Replies
Feb 24, 2010
I'm making an rpg game but the map images i'm making are very large and I wanted to know if its possible to make the picturebox zoom on one particular region of the image and make the image move within the picturebox...
[Code]...
View 4 Replies
Feb 28, 2009
I have one panel, and on that one picturebox with large image, so panel shows scrollbars.Now I am adding one picturebox to that picturebox (which is on panel).And when i move the added picturebox, it looks like, it is resizing the image of picturebox.Actually it is not resizing, but it seems like some barrier or something like that, or may be it is delaying in assigning the new position to picturebox. Additionaly, it works well with all other controls, just picturebox with image creates this kind of problem.[code]
View 1 Replies
Aug 3, 2010
I have a program where if a label box touches a picture box then the game ends. What I want to be able to do is have it so that various pictureboxes appear all along the bottom of the forum then move to the top. I know how to get the pictureboxes moving and I am somewhat familiar to random scripts the only thing I am not sure how to do is create the picture boxes just along the bottom of the forum.
View 18 Replies
Mar 21, 2010
I'm creating an application in visual basic, basically a part of it is where I hope to achieve the function whereby users can move pictureboxs(images) when visual basic is running.
Basically, i've got several picture boxes that obviously cannot be moved around the form at the minute.
For example, i want to be able the user to be able to move picturebox1 around the form when they click on it and move it where they want to as opposed to what it does now - doesnt move.
View 14 Replies
Jun 19, 2011
I don't know what exactly to call this. I am moving a picturebox, depending on the direction pressed. The thing is I have restrictions. I need the picture to move 32 pixels in whatever direction is pressed. The problem I want to remove is, if you hold a direction down, it goes much faster then I want it to.
Ultimately I would like to be able to hold down the key, have the image move slowly, and when I let go of the button I want it to stop moving. Again it HAS to move 32 pixels for each key press/hold.The best way I can describe it is like in a RPG on Nintendo when you're walking on the world map or town or something.
View 1 Replies
Mar 14, 2011
I have a picturebox that is moving across the screen. At the moment I want it too stop at a certain point until a button that is called next is pressed. I then want the picture box to carry on moving across the screen (The total number of times I want this to happen is 5)
Dim nextcommand As Integer = 7
Dim rewindcommand As Integer = 7
Dim x As Integer = 144
Dim y As Integer = 44
Private Sub NextButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextButton.Click
[Code] .....
View 2 Replies
Nov 13, 2008
I'm making my first 2D game, and I've created an object inherited from a picturebox, to use as a little man. I've tried to make it move using a timer, but I'm not satisfied with the result. Sometimes the speed seems to change for no reason.
View 5 Replies
Feb 20, 2012
Trying to write a very simple game moving PictureBox2 around with keys and when it passes over another object such as PictureBox1 the score is incremented and then PictureBox1 is disabled/removed. Problem is that it disappears but every time you pass over that area it still increments the score further as if the object was there still.
Here is current code, but have also tried hide, dispose and Controls.remove with no luck.
If PictureBox2.Bounds.IntersectsWith(PictureBox1.Bounds) Then
score = score + 1
Label1.Text = score
PictureBox1.Enabled = False
PictureBox1.Visible = False
View 4 Replies
Sep 2, 2011
I have a picturebox set to move when the arrow keys are pressed. How do I prevent it from continously moving if the arrow key is HELD DOWN. I want to make it so the user has to press the key each time manually to move the picturebox.
View 14 Replies
Apr 23, 2011
I'm doing a maze using VB10. its about moving a PictureBox between LineShape lines using buttons to move it. the problem is, can I make the picture not to move through the LineShape? if so how? or should I use something else other than the LineShape and another question can i save the progress of the maze and come back to it later? if so does it require using a database to save the location of the PictureBox?
View 3 Replies
Aug 9, 2011
I'm trying to create a small game in VB2010. The gameplay is as follows:
civilians would walk/stand in a room/street and suddenly an evil character would pop from the ground/wall. This evil character would suddenly vanishes too. So, the player has to shoot it to kill the character. The evil character, civilians, etc. would be random. Also, there would be sound effects too. That is the popping up of the evil character, it's voice, the civilians voice, etc. I'm trying to make it as simple as possible but without degrading the quality of the game play. I think, I could somewhat create the graphics for the characters, scenes, etc. and can get the sound effects recorded.
So, the difficult part is,[ ] how could I make it a smoother for playing the game ?
[ ] what would be the best way to do animations ?
[ ] Creating a GIF and placing it in the picturebox and moving it ?
[x]how to play the music in background and at the same time play sound effects on certain instance ?
View 2 Replies
Oct 5, 2008
I have this:
Private m_PerformanceCounter As New _
System.Diagnostics.PerformanceCounter( _
"Processor", "% Processor Time", "_Total")
[code]......
View 4 Replies
Nov 19, 2010
I am a complete beginner and I was wondering where do I need to look to learn how to set a file path without knowing if the HDD is C:, D:, E:.. I'm using VB2010
View 5 Replies
Mar 19, 2009
I'm trying to query a datatable to establish the primary key [identity column], by querying each columns autoincrement property. However its always false (for the column which is the Idenity/PK).
Querying the tables primary key collection reveals that the datatable doesn't think it has a PK.;
Dim dc As DataColumn() = dt.PrimaryKey
Debug.WriteLine(dc.Count) 'Result is 0
[Code]....
View 3 Replies
Oct 16, 2009
how to display the list of all my application users who are currently online on a gridview and every user of my application sees who's online. How do I go about this if and if I am not using the built-in ASP.NET membership controls?
View 4 Replies
Jun 14, 2011
How can i retrieve the key of a hasmap knowing the value?
Example:
'declaring
Dim myHash As New Hashtable
'filling it with some values
[Code]....
Now i want to retrieve the key, lets say of "Z", how i do it?
Did not fount any Method or property to do so.
Dim position as integer = myHash.Item("Z") ' do compile but not work always get position=0 when i expected position=1
View 5 Replies
Jan 6, 2011
If I have four items in the listbox, e.g. a, b, c, d, how can I find the name by knowing from the top the item is number 3 (c)?
View 6 Replies
Mar 10, 2010
I need to access Mozilla FireFox's cache, but the path to it is different in each PC. Well, kind of.
This is the path: C:Users%USERPROFILE%AppDataLocalMozillaFirefoxProfiles*.defaultCache"
The ".default" folder will always have that extension, but the asterisk part is different on each PC.[code]...
View 2 Replies
Apr 4, 2011
Given the name of a field that exists on a class (public) and not knowing the field type, is it possible to compare this field on an instance of the class to the same field on another instance of the same class? I'm trying to do this for a "ValueHasChanged" function, something like the following:
Protected Function ValueHasChanged(ByVal fieldName as String) As Boolean
Dim presentFieldInfo = presentInstance.GetType().GetField(fieldName)
Dim originalFieldInfo = originalInstance.GetType().GetField(fieldName)
Return presentFieldInfo.GetValue(presentInstance) <> originalFieldInfo.GetValue(originalInstance)
End Function
The Return line spawns a compiler error about not being able to compare operands of type Object for operator '=', which makes sense, of course. Is there a way I can cast the values or do this differently without having to test the field's type and write a long switch/if...elseif statement?
View 2 Replies
Aug 3, 2010
SPECS: Visual Basic 2008 - SP1/2, Framework 3.0.3.5, Windows XP Pro, SP3? trying to wright code for checking for existing files but what has me stumped is the (WHAT IF PART) of it witch in fact is what I want to see. What im saying is can I find a file without knowing where it is on all drives? Or how can i find a folder if I dont know where they installed it to.
Example: I know that C:Perfect World International <--- is the default location where my game installs but what if I installed it on D:Perfect World International; or rather on drive G or H. How would I test to see if it exist without making a bunch of nested If statements to test every drive for it.
this also applies to files like: D:Perfect World EntertainmentPerfect World Internationalelementelementclient.exe is there a way to find these files to see if they exist. I know that Perfect world international does not use the program files to put there program files in as you see above. so Envirnment variables I think cant be used correct me if I'm wrong. BUT I know the registry of a computer keeps some stord information as to where these applications are installed to like (References App Data).
What I'm trying to do is use this to tell the user in a Label that the game is installed in this path but I know in some circumstances the game is not installed on drive C: or D: or even in this directory some users can install it in there own directory such as C:PWI. and as such the file elementclient.exe can even be in C:PWIelementclient.exe. So to sum it all up can this be found useing some sort of code to find the file and folder and return them both in 2 difrent labels like this
Game Is Installed In: C:Perfect World International
Game Client Name: elementclient.exe, C:Perfect World Internationalelement
Game Found On Drive: C:
ETC.
I'm thinking and keep thinking that this can be done in many ways but as for environment variables I'm stumped. But perhaps windows registry may play a role in doing this but I myself don't even know where this stuff may be found; and even more how to apply it to code.
View 5 Replies
Jan 10, 2006
How can I hide a window knowing his process ID?
I am writing a program which opens another application with the "shell" command (so it's easy for me to get the procID). Once it is running I want to hide or show it when needed by pressing a button in my program...
View 3 Replies
Jan 12, 2010
[code]Now ifrm.document will refer to the parent document.So what is the document INSIDE ifrm?
View 1 Replies