Solved

COM and Internet Explorer

Posted on 2000-05-10
1
179 Views
Last Modified: 2010-04-04
In examples Delphi on COM there is an example Web Browser.
 And how from the program to operate (control) activity Internet Explorer directly (For example to start at 11 hours www.rbc.ru)?.
0
Comment
Question by:doncov
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
shenqw earned 50 total points
ID: 2796986
The Left thing is very easy,I think you can do it yourself.  :)

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls,SHDocVw;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var
  IEs:IShellWindows;
  IE:IWebBrowser;
  StartUpInfo: TStartUpInfo;
  ProcessInfo: TProcessInformation;
  hIE:THandle;
begin
  IEs:=CoShellWindows.Create as IShellWindows;
  if IEs.Count<1 then
  begin
    FillChar(StartupInfo, SizeOf(TStartupInfo), 0);
    with StartupInfo do
    begin
      cb := SizeOf(TStartupInfo);
      dwFlags := STARTF_USESHOWWINDOW;
      wShowWindow := SW_SHOWNORMAL;
    end;
    if CreateProcess('C:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE',
       nil, nil, nil, False,NORMAL_PRIORITY_CLASS, nil, nil, StartupInfo, ProcessInfo) then
    begin
      hIE:=ProcessInfo.hProcess;
      while WaitForInputIdle(hIE,100)<>0 do Application.ProcessMessages;
      While IEs.Count<1 do Application.ProcessMessages;
    end;
  end;
  if IEs.Count>0 then
  begin
    IEs.Item(0).QueryInterface(IWebBrowser,IE);
    if IE<>nil then
    begin
      while IE.Busy do Application.ProcessMessages;
      IE.Navigate('http://www.experts-exchange.com',EmptyParam,EmptyParam,EmptyParam,EmptyParam);
    end;
  end;
end;

end.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question