zoukankan      html  css  js  c++  java
  • 打开网页 DELPHI

    uses ShellAPI;
    procedure TForm1.Button1Click(Sender: TObject);
    begin
    //用IE打开
    ShellExecute(Handle, 'open', 'IExplore.EXE', 'about:blank', nil, SW_SHOWNORMAL);
    //用火狐打开
    ShellExecute(Handle, 'open', 'firefox.exe', 'about:blank', nil, SW_SHOWNORMAL);
    //用默认浏览器打开
    ShellExecute(Handle, 'open', 'Explorer.exe', 'about:blank', nil, SW_SHOWNORMAL);
    end;


    //另一种调用IE打开的方法
    uses ComObj;
    procedure TForm1.Button1Click(Sender: TObject);
    procedure OpenInIE(aURL: string);
    var
    IE: Variant;
    begin
    IE := CreateOleObject('InternetExplorer.Application');
    IE.Visible := true;
    IE.Navigate(aURL);
    end;
    begin
    OpenInIE('www.132435.com');
    end;


    //第二种方法可以有更多控制
    procedure TForm1.Button1Click(Sender: TObject);
    procedure OpenInIE(aURL: string); //need uses ComObj;
    var
    IE: Variant;
    begin
    IE := CreateOleObject('InternetExplorer.Application');
    IE.Visible := true; //可见
    IE.left := 0;
    IE.top := 0;
    IE.height := 600; //高度
    IE.width := 800; //宽度
    IE.menubar := 0; //取消菜单栏
    IE.addressbar := 0; //取消地址栏
    IE.toolbar := 0; //取消工具栏
    IE.statusbar := 0; //取消状态栏
    //IE.resizable := 0; //不允许用户改变窗口大小
    IE.Navigate(aURL);
    end;
    begin
    OpenInIE('www.132435.com/blog');
    end;
  • 相关阅读:
    位操作(Bitmanipulation)
    访问固定的内存位置(Accessingfixed memory locations)
    poj2501
    poj2664
    poj2535
    poj2579
    poj2495
    图形的信息编码与表征
    计算机视觉计算理论与算法基础computer vision algorithms and the theoretical calculation based
    计算机视觉的理论(北大 秦其明)
  • 原文地址:https://www.cnblogs.com/fengju/p/6173921.html
Copyright © 2011-2022 走看看