PictureBox control is the most powerful and complex items in the Visual Basic .The picture box is one of the controls that used to handle graphics.you can load a picture at design phase by clicking on the picture item in the properties window and select the picture from the selected folder .You can also load the picture at runtime using the LoadPicture metoh.For example,the statement will load the picture “abc.jpg” into the picture box.
1. Start -> program-> Microsoft Visual Studio 6.0 -> Microsoft Visual Basic 6.0
2. Visual Basic load and appears on your screen.
3. Choose Standard Exe. From dialog box.
4. Add Picture1 control and four Button command1,command2,command3,command4 from the toolbox on the form.
5. Set the caption property of command1(down),command2(top),command3(right),command4(left).
6.Click on code window from project window.code window is open select the object one by one from the object window and write the code here as shown in figure.
7.When the codding is complete then you run the program .
8. To run the program press <f5>.output is:
9. When you click on top button picture move on top,if click on down picture move in down ,if click on left picture move in left,if click on right picture move in right.
TreeView Control in Visual Basic 6.0
The TreeView control display a hirearchical display node object.Each node consist of label ,optional bitmap.You ...read more
DriveListBox,DirListBox and FileListBox in Visual Basic 6.0
Three of the controls on the ToolBox let you access the computer's file system. They ...read more
Pointer Control in Visual Basic 6.0
Pointer control is used to resize and position a control. When you're drawing controls on ...read more
OLE control in Visual Basic 6.0
Insertable Objects (like the Excel Worksheet object; with a list of the employees, or a ...read more
ToolTip in Visual Basic 6.0
A tool-tip is a small box that is displayed at the mouse location when overing ...read more
Frame,Image and Picture Control in Visual Basic 6.0
A frame is an object that provide a visual an functional container for controls.it is ...read more