CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2001
    Posts
    9

    export dialog boxes

    how do you bring up the default windows import/export dialog boxes?

    the VB help files draw a total blank here

    thanks in advance.


  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: export dialog boxes

    You can use the commondialog control for that. This allows the user to select a file for opening, saving and stuff. You will have to write the code to save/load yourself, it's only the looks you get.
    You can customize it, by setting the caption of the control, specifying which files he should show, and some other things.
    To use it, add the component to the project and place it on a form

    CommonDialog1.DialogTitle = "Select file to open"
    CommonDialog1.Filter = "Text Files|*.txt|All files|*.*"
    CommonDialog1.ShowOpen = "Text Files|*.txt|All files|*.*"

    If CommonDialog1.FileName <> "" then
    ' do stuff to open it
    End if




    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: export dialog boxes

    You can use the commondialog control for that. This allows the user to select a file for opening, saving and stuff. You will have to write the code to save/load yourself, it's only the looks you get.
    You can customize it, by setting the caption of the control, specifying which files he should show, and some other things.
    To use it, add the component to the project and place it on a form

    CommonDialog1.DialogTitle = "Select file to open"
    CommonDialog1.Filter = "Text Files|*.txt|All files|*.*"
    CommonDialog1.ShowOpen

    If CommonDialog1.FileName <> "" then
    ' do stuff to open it
    End if




    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  4. #4
    Join Date
    Aug 2001
    Posts
    9

    Re: export dialog boxes

    thanks a lot ... it was the common dialog bit that was giving me the problem. all fixed now.


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

Featured