|
-
August 23rd, 2001, 04:11 AM
#1
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.
-
August 23rd, 2001, 05:38 AM
#2
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
-
August 23rd, 2001, 05:38 AM
#3
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
-
August 23rd, 2001, 09:45 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|