How to Load any image in Picture box control
Posted on August 27, 2011
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 |