CodeItBetter Programming Another VB Programming Blog

How to Load any image in Picture box control

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'Controls - How to Load any image in Picture box control

'Using the LoadPicture function

Picture1.Picture = LoadPicture("c:\windows\setup.bmp")
 
'Clear the current image using either one of the following statements:

' These are equivalent.
Picture1.Picture = LoadPicture("")
Set Picture1.Picture = Nothing
 
'LoadPicture function has been extended in Visual Basic 6 to support icon files
'containing multiple icons. The new syntax is the following:
'
'LoadPicture(filename, [size], [colordepth], [x], [y])
'
'where values in square brackets are optional.
'
'To copy an image from one PictureBox control to another by assigning the target
'Control 's Picture property:

Picture2.Picture = Picture1.Picture

Related posts:

  1. How to load a picture in picture box by selecting the picture using Common dialog control.
  2. How to copy an image from one PictureBox control to another
  3. How to Copy and Paste the Picture
  4. How to stretch image in a Picture Box Control
  5. How to assign image from imagelist control to another control at runtime
  6. How to select/remove picture in a picture box
  7. How to stretch Picture Box
  8. How to remove Picture from PictureBox at Run-Time
  9. How to add Picture to PictureBox at Run-Time
  10. How to set background picture for form (like the background image of a HTML Document)

Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.