Results 1 to 14 of 14

Thread: About comdlg32.dll

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    7

    Smile About comdlg32.dll

    Hi,
    I hop this ti the right forum to ask about this topyc:
    I whant to add parameter that will say if all the options to change a path by user for save/open file is able..(in the save/open dialog).
    This is my code:
    Thank you!!!
    Yael.
    Code:
    Option Compare Database
    Option Explicit
    
    Type tagOPENFILENAME
        lStructSize As Long
        hwndOwner As Long
        hInstance As Long
        strFilter As String
        strCustomFilter As String
        nMaxCustFilter As Long
        nFilterIndex As Long
        strFile As String
        nMaxFile As Long
        strFileTitle As String
        nMaxFileTitle As Long
        strInitialDir As String
        strTitle As String
        Flags As Long
        nFileOffset As Integer
        nFileExtension As Integer
        strDefExt As String
        lCustData As Long
        lpfnHook As Long
        lpTemplateName As String
    End Type
    
    'BrowseFolder Declarations
    Private Type BROWSEINFO
      hOwner As Long
      pidlRoot As Long
      pszDisplayName As String
      lpszTitle As String
      ulFlags As Long
      lpfn As Long
      lParam As Long
      iImage As Long
    End Type
    
    Declare Function aht_apiGetOpenFileName Lib "comdlg32.dll" _
        Alias "GetOpenFileNameA" (OFN As tagOPENFILENAME) As Boolean
    
    Declare Function aht_apiGetSaveFileName Lib "comdlg32.dll" _
        Alias "GetSaveFileNameA" (OFN As tagOPENFILENAME) As Boolean
    Declare Function CommDlgExtendedError Lib "comdlg32.dll" () As Long
    ...

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: About comdlg32.dll

    Moved

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    7

    Hi

    http://www.vbforums.com/showthread.php?t=451509
    Hi,
    How can I disable all the dialog buttons and enable only the cancel/save/open?
    My goal is the user could not change the path.
    Thanks.

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: About comdlg32.dll

    Threads merged - please reply to the same thread, rather than create new ones for the same issue

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    7

    Re: About comdlg32.dll

    Quote Originally Posted by si_the_geek
    Threads merged - please reply to the same thread, rather than create new ones for the same issue
    could you help me please???
    Thanks'
    Yael

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: About comdlg32.dll

    I don't know any way of doing that.. I would expect that the easiest solution would be to create your own form which only has the functionality you want.

    This could just be a textbox with Save/Open and Cancel buttons, or you could also have a list of files in the folder too.

  7. #7

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    7

    Re: About comdlg32.dll

    Thanks for your answer.
    Cuold you know any link to example for that?
    (I'm java programing' not VB - so I need any code )

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: About comdlg32.dll

    You can customize the common dialog box but only to a certain extent and its not exactly easy.

    For an example, look at this link - http://vbnet.mvps.org/code/hooks/fil...ookadvtext.htm
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    7

    Re: About comdlg32.dll

    Thank you,
    first I'm trying to run "GetOpenFileName: Customize File Open/Save Common Dialog Controls" example.
    I'm running it on access, (VBA),.
    Please' cuold you tell me where is the "main method" to call here from button event to run this dialog..

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: About comdlg32.dll

    It would be the Command1_Click procedure where you initialize the features. Then the actual call is made with ...

    'call the API
    Call GetOpenFileName(OFN)
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    7

    Re: About comdlg32.dll

    Thanks for your help,
    Maybe do you know some code for just save / open file (it is not metter to me how it's look).
    Just dialog for save / open file will be ?

  12. #12
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: About comdlg32.dll

    All the code examples are on that site.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  13. #13

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    7

    Re: About comdlg32.dll

    Maybe it this flags?
    OFN_NOCHANGEDIR
    OFN_NONETWORKBUTTON

  14. #14
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: About comdlg32.dll

    What is it you are trying to do? The linked example is complete and functions fine.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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