How to run an internet adress ????

G

Guest

Dear all,

I have a menu item in my application on which when a click is executed
should open internet explorer and jum to the predifined adress.
Doing this generated an execption error like "file not foud", sound strange..

I launch it in the following way :

Dim sWebLink As String
sWebLink = "http://miscrosoft.com"

myProcessStartInfo = New ProcessStartInfo(sWebLink)
myProcess = New Process
myProcess.StartInfo = myProcessStartInfo
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
myProcess.Start(myProcess.StartInfo)

What is wrong on what I am doing ?

regards
serge
 
G

Guest

I have a menu item in my application on which when a click is executed
should open internet explorer and jum to the predifined adress.
Doing this generated an execption error like "file not foud", sound strange..

I see a couple of things.

First, use "http://www.miscrosoft.com" instead of "http://miscrosoft.com"

Second, you code has mixed usage of "myProcessStartInfo" and
"myProcess.StartInfo". Did you Dim myProcessStartInfo somewhere?
To launch your link, all you really need is
Diagnostics.Process.Start("iexplore.exe", sWebLink)
which will launch a new window. Also,
Diagnostics.Process.Start(sWebLink)
but this code usually re-uses an existing open window for the link.
 

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