picturebox location runtime
-
hi there, I am new to VB2005 Express, and would like to know if it is possible to change the location of a picturebox via code at runtime. In my program i have the screen cut into quarters and would like to display an image from one of the quarters to full size. The top left works like a charm. The others only fill half the screen from where they are. Thank you.
-
hi there, I am new to VB2005 Express, and would like to know if it is possible to change the location of a picturebox via code at runtime. In my program i have the screen cut into quarters and would like to display an image from one of the quarters to full size. The top left works like a charm. The others only fill half the screen from where they are. Thank you.
You can change the Location, or Top and Left, properties to move the entire window. You then change the Size, or Width and Height, properties to change the controls size to whatever you want. All the properties of a PictureBox control are changable at run-time.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
hi there, I am new to VB2005 Express, and would like to know if it is possible to change the location of a picturebox via code at runtime. In my program i have the screen cut into quarters and would like to display an image from one of the quarters to full size. The top left works like a charm. The others only fill half the screen from where they are. Thank you.
-
when changing location, be sure to specify it as
New
. For example:PictureBox1.Location = New Point(x,y)
Posted by The ANZAC
Thanks for all your replys.:):cool: