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!

Launch IE with no toolbars? 1

Status
Not open for further replies.

IjumpOverU

Technical User
Jul 31, 2003
43
0
0
US
Is there a way to launch internet explorer from VB.Net and hide all of the standard toolbars? I want to hide the address bar, navigaton buttons and menus. I know this is possible via java script but would not know how to incorperate it into vb.

Currently I am using the following code:
Dim openReport As New System.Diagnostics.ProcessStartInfo("IExplore.exe")

openReport.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized

openReport.Arguments = "
System.Diagnostics.Process.Start(openReport)

Thanks for any help!!
 
Try the following at a command prompt:

C:\Program Files\Internet Explorer>iexplore -k www.google.com

If its what you need then your code should be quite easy to modify.

Hope this helps.


[vampire][bat]
 
Almost!

I actually want a titlebar there so the user can close the window with a mouse click.

Thank You!!
 
The kiosk mode can be closed with Alt+F4 but if you really need to use the mouse, I'm not aware of any IE startup options that would give you that. The only other solution that I can think of would be to send F11 with SendKeys - not an ideal solution but ...


Hope this helps.



[vampire][bat]
 
Not the best code I've ever written but ...

Code:
    Dim ProcessTitle As String
    Dim p As New System.Diagnostics.Process
    Try
      ProcessTitle = p.Start("iexplore", "[URL unfurl="true"]www.tek-tips.com").MainWindowTitle[/URL]
      Me.Visible = False
      SendKeys.SendWait("{F11}")
    Catch
      MessageBox.Show("Error loading web page")
    End Try
    Me.Visible = True
    Me.WindowState = FormWindowState.Minimized
    Try
      AppActivate(ProcessTitle)
    Catch
      MessageBox.Show("Error loading web page")
      Me.WindowState = FormWindowState.Normal
    End Try

... should do what you are asking for.

A couple of points -

This leaves IE in FullScreen mode after it is closed (ie IE will open up in FullScreen mode next time it opens)

The two Try Blocks seem to be necessary as is Me.Visible = False

Simply using p.Start("iexplore", " generates an error if you try to use p too soon, hence the convoluted workaround.

Hope this helps.

[vampire][bat]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top