Another "Is it possible" question!!!

Arg81

Well-known member
Joined
Mar 11, 2005
Messages
949
Location
Midlands, UK
Programming Experience
1-3
Guys,

Within my app I have a field for the user to enter the path of a network drive where any reference documentation may be, i.e s:\My Folder\Word.doc

My question....as users have an inability to "spell correctly" (in my case anyway), is it possible to have an explorer type button next to the field which the user can browse through, find the file, click OK and then the path to that file is copied to the field?

I then need to have the field as a hyperlink so the user can click on it to open the documentation.....

Cheers guys'n'gals
Luke
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
i would suggest using an OpenFileDialog control for the finding of the *.doc file(s) the OpenFileDialog control is located right in the toolbox towards the bottom (there's several in the same spot, a PrintFileDialog, SaveFileDialog, ColorDialog, etc..)
 

Arg81

Well-known member
Joined
Mar 11, 2005
Messages
949
Location
Midlands, UK
Programming Experience
1-3
Didn't realise how easy this was!!!!!

FYI, created a btnBrowse button and used the following code;

Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles btnBrowse.Click

Dim x As New OpenFileDialog

If x.ShowDialog = DialogResult.OK Then

txtDocument.Text = x.FileName

End If

End Sub


....Now all I need to do is figure out how to make that textbox as a hyperlink to the document displayed...
 

Arg81

Well-known member
Joined
Mar 11, 2005
Messages
949
Location
Midlands, UK
Programming Experience
1-3
hehe even managed to blag the hyperlink!

i replaced my textbox with a link label, and added a border so it looked like the rest of the textboxes.
I then set the code to txtDocument_Click as:

dim strDoc as string
strDoc = txtDocument.text
Process.Start(strDoc)

Job done!! Who said I had no innovation?!?!

Thanks for your help JuggaloBrotha for pointing me in right direction!
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
lol not a problem, glad to know you got everything working
 
Top Bottom