Visual Basic, C & C++
분류 Delphi

델파이에서 ie 창 띄우기

페이지 정보

본문

uses 
  ComObj;

procedure TForm1.Button1Click(Sender: TObject);
var                                            // uses 구문에 'ComObj'를 추가
  IE: Variant; 
  WinHandle: HWND; 
begin 
  if VarIsEmpty(IE) then 
    begin
      IE := CreateOLEObject('InternetExplorer.Application');
      IE.Visible := True;
      IE.Navigate('http://www.nuno21.net/');
    end
  else
    begin
      WinHandle := FindWindow('IEFrame', nil);

      if 0 <> WinHandle then
        begin
          IE.Navigate('http://www.nuno21.net/');
          SetForeGroundWindow(WinHandle);
        end;
    end;

end;
end.

관련자료

등록된 댓글이 없습니다.
프로그래밍
Today's proverb
절벽에서 떨어지고 있는 상황일지라도 아무것도 할 수 없는 것은 결코 아니다. 떨어지고 있으니까 하늘을 향해 날 수 있지 않은가? (로버트 슐러)