I have a web browser program that I have put on a CD. I want to find a way when i open it it needs to open an html file i have specified on the CD with it. I have tried using a hidden text bar and have it open that file on load, Though the only problem is i can not figure out a way to make it work on every computer. For instance the file on my computer would be E:/HTML/file.html. Though on another computer it would be maybe D:/HTML/file.html because everyone's disk drives are different. Is there a function or some other way i can make this work? Please help
EDIT: Oops. Thought I was still in Windows Programming. I see this is General C++ Programming. Well, my solution would be one for Windows. Linux, Mac, etc. I don't know. :-(
Public Class Form1
Private Sub Application_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate(TextBox1.Text)
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate(TextBox1.Text)
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
End Class
In the Textbox's field "Text" i have set it to HTML\\htmlfile.html to be the default text, which means the page will load on that, I know this works because i tried it with google.com