I set up some code that allows the user to drag and drop PictureBoxes. The problem is that I have 9 PictureBoxes arranged in a 3x3 square and I need all of them to move as one. I put them in a panel hoping I could use my code with the panel, but that doesn't work since the PictureBoxes are what the User clicks, not the panel.
I have split conainer with a tab control on panel2. I am adding tab page to the tab control at run time. On the tab page I am placing 2 picture boxes next to each other. Then I am loading images to the picture boxes from *.tif file (frame1 and frame2). All works fine except when moving vertical scroll bar the invisible portion of an image in one of the picture boxes becomes smear.
Private Sub fadingstyle() If pathload IsNot Nothing Then Dim pathload7 As String = pathload
I have an application where I have different picture boxes which the user can drag and move.I also have different empty pictureboxes.
What I want to do:I want to let the user be able to drag a picturebox to one of the empty pictureboxes. Also, If the user drags a picturebox to an invalid place (outside the bounds of any of the empty pictureboxes), the dragged picture box should return to its previous location.
So what I currently have is the usual drag-drop code and on the MouseUp event, I run this code (currently only checking for one empty picturebox):
If Not pbEmpty1.Bounds.Contains(Me.PointToClient(pbRemote.Location)) Then pbRemote.Location = OldLocation End If (pbEmpty1 = Empty picturebox, pbRemote = picturebox that is dragged)
But it doesn't work, it doesn't care if the picturebox is inside the bounds of the empty picturebox or not, it still returns to its previous location...
I have a List wich contains names of all images that is going to be used in the application. I want to loop through all the pictureboxes and assign each image to a picture box. I tried this:
I am creating a photo hunt game for grades 6-9 in summer camp. I want them to alter an image in paint then create two picture boxes. I want to put in ovals with no fill color to mark the differences in the picture but VB.net won't let me send the images behind the ovals.
I am using VB 2008 Stanard. (Windows 7, 64 bit) I wrote a program using the 'Any Cpu' setting. I now want to rebuild the same application to word on x86 machine, but the program does not word, keeps on givin me an internal exepcetion.
I changed the Platform to x86, but it does not work. It compiles, but does not run on the Windows XP sistem, I does however work on Vista and Windows 7 How can 'n rebuild this to work on Windows XP?
Have been doing well moving a VB6 project to VB 2008.Here's another question.I am making an onscreen keyboard.I have my qwerty buttons handled by the same Event, as recommended to me by someone in these forums. It works great, and it was easy to set up.In my VB6 project, when I designed the "CAPS" button, all I had to do was this:
[Code]...
Can someone take a second and explain to me how this is accomplished in VB 2008? Do I have to physically type every button into an array and then do something like I did in VB6?
I am coding a program and I want to add an option of moving 2D map (using the mouse to move the map left, right, up and down). when I say to move a map is not moving a window. I want actually to move the map itself, for example "google maps".
Dim txtfilename As String = OpenFileDialog1.FileName My.Computer.FileSystem.MoveFile(txtfilename, "C:WindowsSystem32oobeInfoackgrounds") MsgBox("File Moved")
I already got the move part, that's easy, what I'm having trouble with is when I click on the form and try to move it, it shifts a little, that is really annoying, I just want it to be smooth. I want it to be as if I'm moving the form from the title bar. [Code]
I am writing a program to manage some of my files. I already know when I want to send a file to the recycle bin, so I don't need the system to prompt me each time. How do I tell it to back Off, and just do it?
Here is my Sub RecycleBinFile(ByVal strFilename As String) My.Computer.FileSystem.DeleteFile(strFilename, FileIO.UIOption.AllDialogs, FileIO.RecycleOption.SendToRecycleBin, FileIO.UICancelOption.DoNothing) End Sub
Some of my research has pointed me to FileIO.UIOption.AllDialogs.
I have this Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown lblText.Text = rectangle1.X If e.KeyCode = Keys.Right Then rectangle1.X = rectangle1.X + 5 [Code] ..... And the text changes but the ractangle doesn't move... What can I do?
How would I move the mouse to a color thats somewhere on the screen, not the form? I heard that GetPixel was a slow method, what would be a better/faster method? -I dont want to take a bitmap of the screen and then search the bitmap-I have already searched the forum, but I cant find what I want
I have a panel that has 9 pictures boxes within it. I need the User to be able to create as many instances of this control as they like.
Then each control needs to be able to move freely within the form.
I've created the control and added the appropriate code to move it around the control.
I've made the control canvas the same size of the panel. The problem is that when I move the panel, it only moves within the bounds of the control canvas. I guess I could increase the size of the canvas, but then additional controls would still only be able to move within their bounds and it would come out all wrong.
Is there anything I could do about this? Or is there a better method?
i recently posted a thread about the same project, but decided this was a more specific question, so i decided to open a new thread My question regards the graphics class in visual basic 2008. Ive searched the internet low and high for an answer to this, but i cannot find anything! I am attempting to 'shoot' a circle drawn on the form when the user presses the 'r' key. if a string property is set to right, the graphic should be drawn, then updated to different x coordinates based on an interval. if the property is 'up' or 'down' then the y coordinate of the graphic should be changed based on another interval. Now i cannot use one preset timer, because i would be able to shoot only one bullet at a time, which would not work!
Does anyone know how i can either create an array of graphics(bullets) and add to the list every time the user presses r, then using one preset timer, update them all, or simple create a timer every time a bullet is created, then update the bullet position with its own timer.
I'm designing a new application, but have two big problems.I wanna put an image in my form, and have the possibility to drag them.For example, I put an image with 100*100 but my imageviewe ronly have 50*50 So, I wanna drag the image around the imageviewer.
How can I do this?The other problem is:In the image I wanna design some squares, with the possibility to drag them to.Drag the squares it's working fine.But, the problem is, when drag the image, I wanna the squares "follow" the imagem and keep thei position in the image.If it was confuse, I try upload an explanation image.
I have been developing my program using Vista on my laptop, and I want to move it to my new desktop with windows7. I had many errors when building the project on the new computer,which I thing I have been able to fixed. This is the last error I am getting when try to debug on the desktop:
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 have created a new project in visual basic and imported a photo in now i want to make the image move inside and I did that the problem is that the image keeps moving out the borders and disappear I want to make it stop how I should do that?
I want to move a viriable content from one form to the other . and like wise. Lets see now here is the startup form. Public Class startup ok as you can see am making a public shared variable to get the name from the textbox and put it in the var, thats easy already done , now the problem I can't get it to be moved to the other form. (Below the 1st code is the code I use to get the outcome from form1 to form2).
Public Shared playername As String Private Sub startup_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged [Code] .....
Is there any way I can move a form in the center of the screen ? I am talking about run time for a form that is already shown . I need this because some times this form may become larger or smaller during run time and I'd like it to be moved in the center of the screen in order to look better . Back in VB6 I used to show again the form (despite being already shown) by MyForm.Show , which resulted i the form being moved to the center , but now it seems this doesn't work anymore ...
trying to move a lineshape (line), across or down my form, but not having any luck with it, I think it is something like this, (but it not quite right)
LineShape1.X1 & LineShape1.X2 = val (HScrollBar1.Value)