Flags Example VB

This example uses the Flags property to define options for the Open dialog box; hides the Read-Only check box and enables preview image window and the find button.

Private Sub cmdSetFlags_Click()
    'Private Sub mnuSetFlags_Click
    Const OFN_HIDEREADONLY = &H4&
    Const FINDANDPREVIEW = &H40&
    'Bitwise OR the flags together
    ImgAdmin1.Flags = OFN_HIDEREADONLY + FINDANDPREVIEW
    ImgAdmin1.ShowFileDialog OpenDlg
End Sub