Directory Path

kvbkvb Member Posts: 107
edited 2007-10-18 in Navision Attain
Hi all

I have a Setup Form. At this form there is a field named "Export path".
This is a path where i will export some information by using dataports.
The name of file will be generated automatically. And the question is:
Is it possible to make some kind of "Directory choose dialog"?

I know about 412 CODEUNIT, but it`s not quite the right solution i think

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Do you know about this download, called "Browse for folder": http://www.mibuso.com/dlinfo.asp?FileID=169
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • kvbkvb Member Posts: 107
    it works, but...

    Automation... :(

    anyway, thanks
  • DoomhammerDoomhammer Member Posts: 211
    we are using this silly way:

    we use COMDLG32 for locating some file from required directory and then we delete file name, so we get only path for directory.
    this is not elegant solution, but when you not like Automation, it can be sufficient.
    var:
    ocxCOMDLG32, OCX, Microsoft Common Dialog Control, version 6.0
    
    OnAssistEdit of control:
    
    WITH ocxCOMDLG32 DO BEGIN
      DialogTitle := 'title of your dialog';
      Filter := 'file type1 (*.OUT)|*.out|file type2 (*.txt)|*.txt|all files (*.*)|*.*';
      ShowOpen;
      IF FileName <> '' THEN
        txtfilename := FileName;
    END;
    

    then delete file name and you will get path :-)

    as I said, very silly.
    Martin Bokůvka, AxiomProvis
  • AsallaiAsallai Member Posts: 141
    Do you know about this download, called "Browse for folder": http://www.mibuso.com/dlinfo.asp?FileID=169

    I needed this stuff in these days and implemented well... but... every time the Shell Window is show up in the background and not in focus! :roll:
    This focused to Windows system but not to Navision and the user cannot see that lookup Shell window!
    I use this:
    SelectedFolder := WindowsShell.BrowseForFolder(0,'Title',1,'');
    
    Where the 0 meanings the Hwnd but how can I set, the Navision is the parent window? :-s
    Thanks for the help!
  • Timo_LässerTimo_Lässer Member Posts: 481
    Asallai wrote:
    Where the 0 meanings the Hwnd but how can I set, the Navision is the parent window? :-s
    Thanks for the help!
    Have a look at this posting.
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • AsallaiAsallai Member Posts: 141
    Thanks it is help, but I would like to be avoid to load a dll for this function :wink:
    I know it is must be loaded .
    Thank you!
  • M._EleveldM._Eleveld Member Posts: 5
    You could create a form based on the table File.
    To only show directories place a filter on the field "Is a File" with the value 'FALSE'.
    You do need to do some programming around it all to make it work, but as you wanted it saves you loading a dll.
Sign In or Register to comment.