Showing posts with label internet explorer. Show all posts
Showing posts with label internet explorer. Show all posts

Thursday, April 9, 2009

Launching and closing Internet Explorer

One can run Internet Explorer in visible or invisible mode, then navigate any url and close the application, finally.

static void TestIE(Args _args)
{
COM c = new COM("InternetExplorer.Application");
str url = "http://msdn.microsoft.com/en-us/library/ms952618.aspx";
;
c.navigate(url);
c.visible(true);
if (DialogButton::Yes == BOX::YesNo("To close the browser press Yes", DialogButton::Yes))
{
info(strfmt("Job is done"));
c.quit();
}
}