- Home
·
- Miscellaneous
·
- Useful for opening and closing pictures from files in a common dialog control.
Useful for opening and closing pictures from files in a common dialog control.
Useful for opening and closing pictures from files in a common dialog control.
Rate Useful for opening and closing pictures from files in a common dialog control.
(1(1 Vote))
'control from Project, Components, select Microsoft Common Dialog
'Controls 6.0, apply this setting and put the control on a form.
'make sure to change control names to the ones I've used below.
Private Sub cmdClosePic_Click()
'close current picture
Picture1.Picture = LoadPicture("")
cmdClosePic.Enabled = False
End Sub
Private Sub cmdOpenPic_Click()
'show common dialog box
CommonDialog1.ShowOpen
'load picture
Picture1.Picture = LoadPicture(CommonDialog1.FileName,4)
cmdClosePic.Enabled = True
End Sub
Private Sub Form_Load()
'disenable control
cmdClosePic.Enabled = False
End Sub
Useful for opening and closing pictures from files in a common dialog control. Comments
No comments yet — be the first to post one!
Post a Comment