App Directory

Lanc1988

Well-known member
Joined
Nov 27, 2003
Messages
508
I am trying to make an install wizard for my program, which i have completed, but now im trying to figure out how to write the code for App.Directory thing.

What im trying to do is that i have a list box and a web browser, when they click the item in the list box it displays in the web browser, but since i will be letting many people download my program, they might have it installed to a different directory than C:\Program Files\My Program so thats why i need this.


My friend has vb 6.0 and he used something like:
Private Sub List1_Click()
Dim directory As String
directory = App.Path & "\Quests\"
WebBrowser1.Navigate (directory & List1 & ".htm")
End Sub




And so far i have got to down to this:
Dim directory As String
directory = App.Path & "\Guides\Quests\"
AxWebBrowser3.Navigate(directory & ListBox1.Text & ".htm")

but i cant get the App.Path to work, it says that "app" is not declared. Can someone please tell me whats wrong with my code?
 
i have a slight problem.. now when i click the item in the list box it says "page cannot be displayed" in the webbrowser, then i click on other items in the list box and it says the same thing.

any ideas?
 
Are the files in the same folder as the application or in sub-folders? If they are in sub-folders you will need to append those to the StartUp path as well.
 
I have one more problem and that is with using pictures.

Can someone tell me how to make that code work for PictureBox? I need it to do the application path thing also.

Thanks.
 
someone please post the code for this.. i really need it so i can release the first version of my program.
 
Back
Top