Calling a Webpage from my Windows App

samsmithnz

Senior Contributor
Joined
Jul 22, 2003
Messages
1,038
Location
Boston
I have a little app I'm developing, and when a certain menu item is clicked I want to display a webpage using javascript (i just want a small window).

Currently I'm using the code:
Code:
System.Diagnostics.Process.Start("javascript:window.open('http://www.samsmith.co.nz/tab', null, 'menubar=no,scrollbars=no,toolbar=no,width=500,height=520');")

The problem is that it works, but has a nasty side effect, it opens a normal IE window first, and then displays the javascript on top.

Does anyone know another way to creating this javascript window or removing the initial IE window???
 
try adding the window.ResizeTo function in your javascript line m8 , eg:
Visual Basic:
        [COLOR=Blue]Dim[/COLOR] pr [COLOR=Blue]As New[/COLOR] Process
        pr.Start("javascript:window.open([COLOR=Green]'http://www.samsmith.co.nz/tab'[/COLOR][COLOR=Blue],[/COLOR] [COLOR=Green]'_self'[/COLOR][COLOR=Blue], [/COLOR] [COLOR=Green]'menubar=no,scrollbars=no,toolbar=no,width=500,height=520'[/COLOR]);window.resizeTo(500[COLOR=Blue],[/COLOR]520);")
[COLOR=Green]'/// note the window.resizeTo(500,520); bit i added and also the '_self' part ( to use the same window )[/COLOR]
hope it helps :)
 
Back
Top