Click here to Skip to main content
16,005,037 members
Home / Discussions / C#
   

C#

 
GeneralWindows XP P2P SDK wrapped in .Net Pin
schnee2k323-Mar-04 13:03
schnee2k323-Mar-04 13:03 
GeneralRe: Windows XP P2P SDK wrapped in .Net Pin
Heath Stewart23-Mar-04 13:34
protectorHeath Stewart23-Mar-04 13:34 
GeneralRe: Windows XP P2P SDK wrapped in .Net Pin
schnee2k323-Mar-04 13:40
schnee2k323-Mar-04 13:40 
GeneralRe: Windows XP P2P SDK wrapped in .Net Pin
Matthew Hazlett23-Mar-04 14:48
Matthew Hazlett23-Mar-04 14:48 
GeneralRe: Windows XP P2P SDK wrapped in .Net Pin
leppie24-Mar-04 6:17
leppie24-Mar-04 6:17 
GeneralRe: Windows XP P2P SDK wrapped in .Net Pin
schnee2k324-Mar-04 13:07
schnee2k324-Mar-04 13:07 
QuestionHow to change url of running iexplorer instance? Pin
ckl_8823-Mar-04 12:47
ckl_8823-Mar-04 12:47 
AnswerRe: How to change url of running iexplorer instance? Pin
Heath Stewart23-Mar-04 13:01
protectorHeath Stewart23-Mar-04 13:01 
One way is to simply use ShellExecute. The default implementation in windows is to use a running instance of Internet Explorer (or whatever the default browser is, which is often the preferred way anyway):
ProcessStartInfo info = new ProcessStartInfo(url);
info.UseShellExecute = true;
Process.Start(info);
You can also use the InternetExplorer out-of-process server if you want to force the user to use IE. This represents the fore-most instance of IE. First create an interop assembly of Internet Explorer by either typing the following:
tlbimp.exe /out:Interop.SHDocVw.dll %WINDIR%\system32\shdocvw.dll
Or using VS.NET to add a COM reference to the "Microsoft Internet Controls" (shdocvw.dll). Then create an instance of the InternetExplorerClass like so:
InternetExplorerClass ie = new InternetExplorerClass();
object url = url;
object missing = Missing.Value; // From System.Reflection
ie.Navigate2(ref url, ref missing, ref missing, ref missing, ref missing);
See Programming and Reusing the Browser[^] for more details.

If you want to host the WebBrowser control (the control that is actually IE, which also hosts MSHTML, the Microsoft HTML rendering engine), you can additionally run:
aximp.exe /out:AxInterop.SHDocVw.dll %WINDIR%\system32\shdocvw.dll
to create an ActiveX host for the WebBrowser control (by default, named AxWebBrowser), which you can host in your forms and container controls. You can find more information about this in the link above (related to the COM interfaces exposed by WebBrowser and MSHTML). There's also several articles here on CodeProject that described advanced hosting using .NET. Just search (a good query term is "IDocHostUIHandler").

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: How to change url of running iexplorer instance? Pin
ckl_8823-Mar-04 13:50
ckl_8823-Mar-04 13:50 
GeneralRe: How to change url of running iexplorer instance? Pin
Heath Stewart23-Mar-04 14:01
protectorHeath Stewart23-Mar-04 14:01 
GeneralStrange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 12:41
professionalAnders Molin23-Mar-04 12:41 
GeneralRe: Strange problem with ownerdraw listbox Pin
Heath Stewart23-Mar-04 13:05
protectorHeath Stewart23-Mar-04 13:05 
GeneralRe: Strange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 13:22
professionalAnders Molin23-Mar-04 13:22 
GeneralRe: Strange problem with ownerdraw listbox Pin
Heath Stewart23-Mar-04 13:37
protectorHeath Stewart23-Mar-04 13:37 
GeneralRe: Strange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 13:40
professionalAnders Molin23-Mar-04 13:40 
GeneralRe: Strange problem with ownerdraw listbox Pin
Heath Stewart23-Mar-04 13:48
protectorHeath Stewart23-Mar-04 13:48 
GeneralRe: Strange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 13:53
professionalAnders Molin23-Mar-04 13:53 
GeneralRe: Strange problem with ownerdraw listbox Pin
Heath Stewart23-Mar-04 13:56
protectorHeath Stewart23-Mar-04 13:56 
GeneralRe: Strange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 14:00
professionalAnders Molin23-Mar-04 14:00 
GeneralRe: Strange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 14:16
professionalAnders Molin23-Mar-04 14:16 
GeneralSerialization Pin
Not Active23-Mar-04 10:06
mentorNot Active23-Mar-04 10:06 
GeneralRe: Serialization Pin
Heath Stewart23-Mar-04 10:37
protectorHeath Stewart23-Mar-04 10:37 
GeneralRe: Serialization Pin
Not Active23-Mar-04 10:48
mentorNot Active23-Mar-04 10:48 
GeneralC#->C++ Interface Issue - Passing Data Pin
Chris_Lutz23-Mar-04 7:58
Chris_Lutz23-Mar-04 7:58 
GeneralRe: C#->C++ Interface Issue - Passing Data Pin
Heath Stewart23-Mar-04 9:04
protectorHeath Stewart23-Mar-04 9:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.