Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Thu, 7 Feb 2008 15:38:42 -0800 (PST),    group: microsoft.public.inetsdk.programming.webbrowser_ctl        back       


programatically open IE window   
Hi,

I have a windows application. Is it possible to open an IE window
programatically on the program? What is the API to do this?  Thanks.
date: Thu, 7 Feb 2008 15:38:42 -0800 (PST)   author:   Sue

Re: programatically open IE window   
Sue  wrote:
> I have a windows application. Is it possible to open an IE window
> programatically on the program? What is the API to do this?  Thanks.

What do you want to do with IE once open? If all you want is to navigate 
the user's default browser to some URL, just do

ShellExecute(0, 0, _T("http://yoururl.com"), 0, 0, SW_SHOW);

-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Thu, 7 Feb 2008 18:58:07 -0500   author:   Igor Tandetnik

Re: programatically open IE window   
On Feb 7, 3:58 pm, "Igor Tandetnik"  wrote:
> Sue  wrote:
> > I have a windows application. Is it possible to open an IE window
> > programatically on the program? What is the API to do this?  Thanks.
>
> What do you want to do with IE once open? If all you want is to navigate
> the user's default browser to some URL, just do
>
> ShellExecute(0, 0, _T("http://yoururl.com"), 0, 0, SW_SHOW);
>
> --
> With best wishes,
>     Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925

The IE Window will contain a java applet to do clean up. Can I still
use the API above? Also I want to remove/disable the close button on
that IE window. I'm thinking of find window by title and disable it.
Am I on the right track? Thanks.
date: Thu, 7 Feb 2008 16:42:40 -0800 (PST)   author:   Sue

Re: programatically open IE window   
On Feb 7, 4:42 pm, Sue  wrote:
> On Feb 7, 3:58 pm, "Igor Tandetnik"  wrote:
>
>
>
>
>
> > Sue  wrote:
> > > I have a windows application. Is it possible to open an IE window
> > > programatically on the program? What is the API to do this?  Thanks.> > What do you want to do with IE once open? If all you want is to navigate> > the user's default browser to some URL, just do
>
> > ShellExecute(0, 0, _T("http://yoururl.com"), 0, 0, SW_SHOW);
>
> > --
> > With best wishes,
> >     Igor Tandetnik
>
> > With sufficient thrust, pigs fly just fine. However, this is not
> > necessarily a good idea. It is hard to be sure where they are going to
> > land, and it could be dangerous sitting under them as they fly
> > overhead. -- RFC 1925
>
> The IE Window will contain a java applet to do clean up. Can I still
> use the API above? Also I want to remove/disable the close button on
> that IE window. I'm thinking of find window by title and disable it.
> Am I on the right track? Thanks.- Hide quoted text -
>
> - Show quoted text -

If I use ShellExecute, if the process that calls it exit, will the IE
window be closed too. If that's the case, that's not what I want. I'd
like to open the IE window, then the current process exit. But the IE
window still opened to do the clean up.
date: Fri, 8 Feb 2008 11:19:26 -0800 (PST)   author:   Sue

Re: programatically open IE window   
Sue  wrote:
> If I use ShellExecute, if the process that calls it exit, will the IE
> window be closed too.

No. ShellExecute spawns a completely separate independent process.
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Fri, 8 Feb 2008 14:45:29 -0500   author:   Igor Tandetnik

Re: programatically open IE window   
Use CoCreateInstance and IWebBrowser2::Quit
http://msdn2.microsoft.com/en-us/library/aa752127.aspx

-- 
Sheng Jiang
Microsoft MVP in VC++
"Sue"  wrote in message
news:b79e7913-edc1-472f-aa0a-0a724b78e87f@e23g2000prf.googlegroups.com...
On Feb 7, 4:42 pm, Sue  wrote:
> On Feb 7, 3:58 pm, "Igor Tandetnik"  wrote:
>
>
>
>
>
> > Sue  wrote:
> > > I have a windows application. Is it possible to open an IE window
> > > programatically on the program? What is the API to do this? Thanks.
>
> > What do you want to do with IE once open? If all you want is to navigate
> > the user's default browser to some URL, just do
>
> > ShellExecute(0, 0, _T("http://yoururl.com"), 0, 0, SW_SHOW);
>
> > --
> > With best wishes,
> > Igor Tandetnik
>
> > With sufficient thrust, pigs fly just fine. However, this is not
> > necessarily a good idea. It is hard to be sure where they are going to
> > land, and it could be dangerous sitting under them as they fly
> > overhead. -- RFC 1925
>
> The IE Window will contain a java applet to do clean up. Can I still
> use the API above? Also I want to remove/disable the close button on
> that IE window. I'm thinking of find window by title and disable it.
> Am I on the right track? Thanks.- Hide quoted text -
>
> - Show quoted text -

If I use ShellExecute, if the process that calls it exit, will the IE
window be closed too. If that's the case, that's not what I want. I'd
like to open the IE window, then the current process exit. But the IE
window still opened to do the clean up.
date: Fri, 15 Feb 2008 14:21:25 -0600   author:   Sheng Jiang[MVP] uss

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us