Need to control a navigate event from different form

  • Thread starter Marcos Beccar Varela
  • Start date
M

Marcos Beccar Varela

Hola, necesito solulcionar un tema que creo que tiene que ver con el manejo
de calses.
Hello to all, I need to make a button in a form , that when pressed, it
oppens a new form, which contains a Webbrowser control, and it passes an url
as a string, then, the new windows starts to navigate!
Also, Im having problems in pcs that doesnt have VB6 installed, when the
webbrowser control form opens. It shuts down!

Heres the code I tried, but its invalid.!

mk_fglobalbrowser = New mkgv2_globalbrowser
mk_fglobalbrowser.MdiParent = Gman.mk_fcrear
mk_fglobalbrowser.Show()
mk_fglobalbrowser.cont_browser.navigate(var_url)
 
C

Cor Ligthert

Marcos,

Did you do it like this?

Open a new windows application project

In the toolbox rightclick and select add/Remove items

In the customize toolbox select Com and in that Microsoft Webbrowser

Set on form1 a button
Set on form1 a textbox
Click on that and than type in the button click event
dim frm = form2 'you will see an error at this moment
dim frm.Url = textbox1.text
frm.showdialog
frm.dispose

Add a new windowsform

Drag from your toolbox that Microsoft Web-browser on form2
(don't make it to small, than it does nothing)

Create in form2 a friend string named url
friend url as string

Then this code and you should have a mini Webbrowser.

Private load_form2 (ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mybase.load
Me.AxWebBrowser1.Navigate2(url)
End Sub

Now all should be complete as you asked.

Most is typed in this message so watch typos

I hope this helps a little bit?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top