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.

관련자료

댓글 0
등록된 댓글이 없습니다.
Today's proverb
현명한 사람이 되려거든 사리에 맞게 묻고, 조심스럽게 듣고, 침착하게 대답하라. 그리고 더 할 말이 없으면 침묵하기를 배워라. (라파엘로)