Picture Box & Image Box in Visual Basic Tutorial

Written by cecelia owens
  • Share
  • Tweet
  • Share
  • Pin
  • Email
Picture Box & Image Box in Visual Basic Tutorial
To put colours on your HTML webpage, use a colour chart (Primary Secondary & Tertiary Colour Wheel image by Sophia Winters from Fotolia.com)

Graphics are important to any webpage, because it can help you gain visitors. Luckily, novice programmers, who have not mastered HTML, can use Visual Basic (VB). The picture and image box on VB lets you use lines and shapes to draw/create graphics and simple designs. Important your own pictures and images to improve the look of your interface. Picture and image box can make programming your webpage easy.

Skill level:


  1. 1

    Load a picture into the picture box. Click on the "Properties" window then click on the 'Picture Property" tab. A box will appear and tell you to upload a picture file. Press the "Browse" button and find your picture on your hard drive.

  2. 2

    Use the load picture method. The picture should fit the following syntax structures, "Image1.Picture=LoadPicture("C:\pathname\picturefilename") or "picture1.picture=LoadPicture(C:\pathname\picturename"). These two file destinations are in HTML form, which is the primary form for Virtual Basic.

  3. 3

    Use the Pset method. Colour is important to any graphic. The Pset method uses x and y coordinates to draw lines from (0,0) to (1000,1000). To use colour on your lines, either use the "vb and the color's name" or the number of the colour on the colour spectrum (See Reference 2). You can enter the Pset, line and circle method via the text box on the your VB page.

  4. 4

    Draw lines using the line method. The line method uses "x1,y1' to "x2,y2." For example to draw a green line from (0,0) to (1000,2000) enter, "Line(0,0)-(1000,2000),vbgreen." To make a rectangle use the following formula, "Line(x1,y1)-(x2,y2),colour,BF."

  5. 5

    Use circles on VB. Use the following formula, "Circle(x1,y1),radius(number),colour." For example, if the coordinates are "Circle(300,300),400,vbblue," the circle will be centred as 300,300 with a radius of 400 and a blue border.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.