paultervit
05-08-2003, 09:40 AM
I need to find a way of finding out the location of a file on my hard drive by the user browsing to it and clicking on it. I'm sure you use something called a common dialogue box but can't find anything in the help. Does anyone know what it is I use.
Thanks
Paul
matrixhacker
05-08-2003, 09:54 AM
I need to find a way of finding out the location of a file on my hard drive by the user browsing to it and clicking on it. I'm sure you use something called a common dialogue box but can't find anything in the help. Does anyone know what it is I use.
Thanks
Paul
the common dialog is used by most if not all windows programs. It is on every persons (windows) computer and is shared. YOu can use it to search for different types of files depending what you want to do. First get the common dialog box on your project by going to (project-components-micrososft common dialog 6.0) then type something like this
Private sub cmdwhatever.click()
dim x as string
commondialog1.fillter = "Text Files|*.txt|Rich text files|*.rft|All text files|*.txt;*.rft"
commondialog1.showopen
commondialog1.filename = x
open x for input as #1
input #1, text1.text
close #1
end sub
just a rough example
hope it helped
bowwer
phinds
05-08-2003, 09:54 AM
the "sandbox" project at the link below my name has example code for using the common dialog boxes to do all kinds of things, including what you are looking for
paultervit
05-08-2003, 09:56 AM
Thanks a lot both of u. I'll give it a try.