Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form.Show, form.ShowDialog, AxWebBrowser control 1

Status
Not open for further replies.

mrmovie

Technical User
Oct 2, 2002
3,094
0
0
GB
Good morning,
I have an app which displays a Pre-Message to a user before installing an application.

I want to be able to display a HTM page on a form to give a user info about what the application they are installing is going to do.

I have a AxWebBrowser control on the form and its is working ok.
If i show do Form1.ShowDialog and have a Btn on the form which does a Form1.AxWebBrowser.Navigate("d:\details.htm") it displays the page in the Control.

However, i want to configure the Form to show the webpage by default.

So I do:

AxWebBrowser.Navigate("d:\details.htm")
form1.ShowDialog()

However this does nothing, the AxWebBrowser control is blank

If i do:

AxWebBrowser.Navigate("d:\details.htm")
form1.Show()

it works, but my code continues to execute which i dont want. I only want the code to continue if the user clicks on a 'Install' button.

Is there away of pre config a AxWeb browser control and using ShowDialog for the form?

Or, how do i use Show(), i can seem to get my head round how i would stop the program whilst using the Show() method.

any advice would bo great

thanks
richard

 
Presumably you are showing the form from sub main

The correct way to show a form this way is to use

dim f as new form1
application.run(f)

and then I would put the navigate method call in the form load event of form1.

Hope this helps
Mark

Mark [openup]
 
thanks for tip. i will adopt the method you have posted.
funny thing it has started working, lord knows why, i havent changed anything.

anyhow thanks again for the info
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top