Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

COM and Internet Explorer

Posted on 2000-05-10
1
Medium Priority
?
183 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 200 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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

705 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