Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing a Form Background

Status
Not open for further replies.

gadget3302

Programmer
Apr 24, 2003
79
US
I am trying to change a form background by selecting the file from a filelist box. What i've done is save the file name into a string variable but it wont load the picture.

Private Sub File1_Click()
Dim drvpath As String
drvpath = Dir1.Path & "\" & File1.FileName
Form1.Picture = drvpath
End Sub

Very simple code. What am I doing wrong?

Thansk Brian
 
Not meaning to split hairs, but if you investigate the LoadPicture Statement, you'll find more help.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top