Board index » cppbuilder » How to use the InternetExplorer Object (not the WebBrowser object) with Builder 4

How to use the InternetExplorer Object (not the WebBrowser object) with Builder 4

    How do I use the InternetExplorer object (not the WebBrowser object) in
Builder 4 to be able to Start/Navigate/Stop the actual Internet Explorer
application. I know it can be done with VC++5 with the following piece of
code:

void main(int argc, char* argv[])
{
 // Initialize COM functionalities
 CoInitialize(NULL);
 {
  // Choice the user will make in the main menu
  MENU_OPTION menuoption;
  // Smart pointer on an IE browser application object.
  SHDocVw::IWebBrowserAppPtr browser( "InternetExplorer.Application" );

  // Make the internet browser visible on the screen
  browser->Visible = 1;

  // Repeat until the users choose to quit
  do
  {
   // Ask the user to choose an action from the menu
   menuoption = Menu();

   // If the user said he wants to navigate...
   switch( menuoption )
   {
   case NAVIGATE:
    Navigate(browser);
    break;
   case TOGGLETOOLBAR:
    ToggleToolbar(browser);
    break;
   case GETCURRENTURL:
    ShowURL(browser);
    break;
   }
  }
  while ( menuoption != QUIT );

  // Close the Internet browser application
  browser->Quit();
 }

 // Uninitialize the COM functionalities
 CoUninitialize();

Quote
}

Alain Gladu
 

Re:How to use the InternetExplorer Object (not the WebBrowser object) with Builder 4


Alain, I think this is possible if you use the automation interface ( as
found in the type library ).

Alex

Quote
Alain Gladu wrote:

[snip]

Other Threads