Home > How-To Library > Controls

How to Load any image in Picture box control

**************************************************************** * © 2007 CodeItBetter http://www.codeitbetter.com * * This notice MUST stay intact for legal use * ****************************************************************
'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

If you would like to submit your code here please us. Do not forget to mention your name. We are always thankful to each and everyone of you who submitted their code here.