Hi all,
I'm guessing there is a really simple answer to this but i've spent the best part of 2 days trying to get it to work and cannot figure it out.
Basically, I want is the webbrowser to point to a local folder on a machine. A different one depending on who is logged on. The code I have so far is as follows.
I cannot get the URL value of the webbrowser (FavProgs) to take the value of directoryname. If I set the URL value in the properties for FavProgs it does what I want it to do perfectly.
Any help would be greatly appreciated. I have bald spots now!!!
Thanks,
Chris
I'm guessing there is a really simple answer to this but i've spent the best part of 2 days trying to get it to work and cannot figure it out.
Basically, I want is the webbrowser to point to a local folder on a machine. A different one depending on who is logged on. The code I have so far is as follows.
VB.NET:
Imports System.IO
Public Class frmFav
Private Sub frmFav_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim username As String
Dim directoryname As String
username = Environment.UserName
directoryname = "C:\Documents and Settings\" & username & "\Local Settings\Application Data\OppsApp"
Label1.Text = directoryname
FavProgs.Navigate(New Uri(directoryname))
End Sub
End Class
I cannot get the URL value of the webbrowser (FavProgs) to take the value of directoryname. If I set the URL value in the properties for FavProgs it does what I want it to do perfectly.
Any help would be greatly appreciated. I have bald spots now!!!
Thanks,
Chris