Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2007

Tip: Looking for answers? Try searching our database.

Launch IE with a complex string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sreelakshmi - 17 Jan 2007 04:05 GMT
Hi

I am working on integrating some help modules and i need to launch the
browser with a url like

X:/WebHelp_WithTOC/index.htm#mergedProjects/ProductA/ProductA_Form1.htm

while i can have a form and a webBrwoser control in it and pass this as
a URl, i want to specifially launch IE with this page.

The standard System.Diagnostics.Process.Start(String filename) does not
work in this case. The error is 'the specified file could not be
found'.  In this function it considers the entire string to be proper
path for a file cos the string starts with X:.

How can i launch this url in a new instance of IE?

Thanks
Chad Z. Hower - 17 Jan 2007 08:06 GMT
> How can i launch this url in a new instance of IE?

You could try making a .url file (short cut) and passing that to IE.

Signature

Chad Z. Hower
Microsoft Regional Director
"Programming is an art form that fights back"
http://www.KudzuWorld.com/
Need a professional technical speaker at your event?
http://www.woo-hoo.net

sreelakshmi - 23 Jan 2007 07:47 GMT
Thanks,

I tried

System.Diagnostics.Process pr = new System.Diagnostics.Process();

                       pr.StartInfo.FileName = "iexplore";

                       pr.StartInfo.Arguments =
"C:/SmartClient/WebHelp_WithTOC/index.htm#mergedProjects/ProductA/ProductA_Form1.htm";

                                              pr.Start();

This works. Though i was looking for a neater solution where there is
no need to call 'iexplore' explicitly. Is there no way to display a url
on the default browser?

Thanks,

> > How can i launch this url in a new instance of IE?
>
[quoted text clipped - 7 lines]
> Need a professional technical speaker at your event?
> http://www.woo-hoo.net
Marius Groenendijk - 23 Jan 2007 09:28 GMT
Hi there,

You'd have to convert your complex URL into an escaped URL. This
does the trick:

 Dim theUri As System.Uri = New System.Uri( yourVeryComplexString )

And this'll start the default browser.

 Diagnostics.Process.Start( theUri.AbsoluteUri() )

HTH,
 Marius.

> Thanks,
>
[quoted text clipped - 26 lines]
>> Need a professional technical speaker at your event?
>> http://www.woo-hoo.net

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.