VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Change form backround with common dialog

by Demian Net (14 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (6 Votes)

Kind of like skinning your program

Rate Change form backround with common dialog

' 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" 
    CDialog.ShowOpen 
 Set Form1.Picture = LoadPicture(CDialog.filename) 
 fileOpenErrr: 
    Exit Sub 
 End Sub 
 
 ' This is what I use for a sort of skin effect on my programs.

Download this snippet    Add to My Saved Code

Change form backround with common dialog Comments

No comments have been posted about Change form backround with common dialog. Why not be the first to post a comment about Change form backround with common dialog.

Post your comment

Subject:
Message:
0/1000 characters