Solved

COM and Internet Explorer

Posted on 2000-05-10
1
174 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

752 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