Activating a broser

  • Thread starter Thread starter Howard Kaikow
  • Start date Start date
H

Howard Kaikow

The following will active IE.

Dim t As Type = Type.GetTypeFromProgID("InternetExplorer.Application")
Dim o As Object = Activator.CreateInstance(t)
t.InvokeMember("Visible", BindingFlags.SetProperty, Nothing, o, New Object()
{True})
t.InvokeMember("Navigate", BindingFlags.InvokeMethod, Nothing, o, New
Object() {www.microsoft.com})

Using the following, I thought that I'd be able to activate Firefox. Did not
work.
Can Firefox be activated in .NET code?

Dim t As Type = Type.GetTypeFromProgID("Mozilla.Browser.1")
 
Howard,

You mean without the process start?

Did you know that beside the process.Start and your method you can as well
start IE with this.

\\\
Public WithEvents Explorer As SHDocVw.InternetExplorer

Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Explorer = New SHDocVw.InternetExplorer
Explorer.Visible = True
Explorer.Navigate("http://msdn.microsoft.com")
End Sub
///

Cor
 
Lemee clarify.

I am going thru Andrew Whitechapel's book MSFT .NET Development for MSFT
Office.
Code is almost all C#, so I am converting to VB .NET as is. It's a painful
process, but I'm learning some C# and getting a better understanding of .NET
stuff.

This particular example is just demonstrating a particular technique. which
is not recommended.

Turns out that there does not appear to be a VB interface for Firefox or
Thundebird.

I'm just trying to replicate the book's examples and converting to VB .NET.
 
Back
Top