Search Tools Links Login

Change form backround with common dialog

Kind of like skinning your program

Original Author: Demian Net


' Name your form Form1
' Load comdlg32.ocx
' Make a Command1
' Make a common dialog named CDialog

Private Sub Command1_Click()
   On Error GoTo fileOpenErrr
    CDialog.CancelError = True
    CDialog.FLAGS = &H4& Or &H100&
    CDialog.DefaultExt = ".jpg"
    CDialog.DialogTitle = "Select File To Open"
    CDialog.Filter = "JPEG (*.jpg)|*.jpg|GIF (*.gif)|*.gif|BITMAP (*.bmp)|*.bmp"
Set Form1.Picture = LoadPicture(CDialog.filename)
    Exit Sub
End Sub

' This is what I use for a sort of skin effect on my programs.

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 94 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.