Rich Cooper wrote:
> I can successfully get the following ShellExecute to start up IE:
> 
>   ShellExecute( 2,'open',
>                 'iexplore.exe',
>                 pChar(WebURL+'News.htm'),
>                 nil, SW_SHOWNORMAL);
> 
> But what if the user is running a different web browser?  Is there
> a better (more generic) way to do this?

The way to do it is to remove mention of a specific program. Tell 
ShellExecute to open the URL itself, as Kraven demonstrated. It works 
the same as when you type a URL into the shell's Run dialog.

And do not use 2 for the window-handle parameter. Use the handle to the 
window that you want to be the parent of any error dialog that 
ShellExecute may need to display. If your program doesn't have any 
windows, then use 0 -- zero -- for the handle value.

-- 
Rob
__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to