Results 1 to 3 of 3

Thread: VB - Common Dialogs fully in code

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member JMvVliet's Avatar
    Join Date
    May 2001
    Location
    Papendrecht, Netherlands
    Posts
    310

    VB - Common Dialogs fully in code

    I ripped this from www.vbaccelerator.com. It's quite old code, but works very well. It's all API, and you can use the Common Dialogs all from within your code, also easy to use in modules and classes. It follows the way of displaying in the different versions of Windows, looks normal in Win98 and fancy in WinXP.

    I've used it in several projects, below how to use:

    VB Code:
    1. Dim cDiag As cCommonDialog
    2.    
    3.     Set cDiag = New cCommonDialog
    4.    
    5.     'Open a file not using the commondialog in VB, but completely via code (to find on internet)
    6.     With cDiag
    7.         .DialogTitle = "Open ARM.mdb.."
    8.         .flags = OFN_FILEMUSTEXIST Or OFN_PATHMUSTEXIST
    9.         .InitDir = App.path
    10.         .Filter = "Access databases (*.mdb)|*.mdb"
    11.         .FilterIndex = 1
    12.         '.HookDialog = True
    13.         .ShowOpen
    14.     End With
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width