Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

Posted

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?

Posted

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.

  • 2 weeks later...
Posted

System.IO.Directory.GetCurrentDirectory

 

:)

This is only a test of the emergency broadcast system

This is a product of hysterical mass confusion

A ship of fools adrift on the sea of our pollution

Rudderless and powerless on the sea of our delusion

pennywise - this is only a test

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...