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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Web Browser Control in New Form

Status
Not open for further replies.

ralphtrent

Programmer
Jun 2, 2003
958
US
Hi
I have a form that has a Web Browser Control. When I make the call to open the form in my MDIParent Form,
here is the code:
Code:
 Dim frmSite As New frmOnyxReportSite
 frmSite.MdiParent = Me
 frmSite.Show()
the form just hangs, when I take out the
frmSite.mdiParent = me line
it opens no problem, but not as a child form. What am I doing wrong?

Thanks.
 
I think you forgot to set the "IsMdiContainer" to true!


-bclt
 
Do i need that for just this one form, my other child forms open with out a problem. I should mention, this form does open, the web browser just hangs.
 
The property IsMdiContainer" must be set to true (only) at the form which will contain the child forms.

If you know/remember in vb6 you had to add a MDI form and those forms that will be children of it; you should set the property "MdiChild" to true. This now in VB.NET is handled with "frmSite.MdiParent = Me AND frmSite.Show()".


What do you mean that hangs?
 
The app handles the forms fine, its just when I go to open the form and hard code the web site i want it to go to, the site does not come. the app is still listening to request and responding to them, just the site will not show. The way I navigate to the page is axWebBrowser1.navigate("
 
Well, as i see there is no problem. I have Norton Antivirus, and when i request a page to be shown to the browser a message appears. If I check a box at lower left the "WindowsApplcation1" will be permamentally (I think i killed this word!) for ever NOT allowed to be viewed in the browser.


Even try to put this in a try block; no error ever will be caught

Code:
Try
  AxWebBrowser1.Navigate2("[URL unfurl="true"]http://www.google.com")[/URL]
Catch ex As Exception
  MsgBox(ex.Message)
End Try
 
another thing to note. If I load the form telling the web browser to display a certain page, it does nothing, but if I supply a textbox and button and enter the url, it works fine. Something is weird.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top