get.pas

来自「mapgis二次开发delphi实例Del_Get」· PAS 代码 · 共 47 行

PAS
47
字号
unit Get;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls,comobj,ChildView,MAPGISBASCOM1Lib_TLB;

type
  TMainForm = class(TForm)
    Panel1: TPanel;
    openfile: TButton;
    procedure openfileClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;

implementation

{$R *.dfm}

procedure TMainForm.openfileClick(Sender: TObject);
var
pntai:Ipntarea;
mychild:TMDIChild;
begin
      pntai:=CreateComObject(class_pntarea) as Ipntarea;
      if pntai.Load('','','','') then
         begin
         mychild:= TMDIChild.Create(application);
         mychild.Hide;
         mychild.Caption:=pntai.Name;
         mychild.ai:= pntai;
         mychild.aitype := gispnt;
         mychild.EditView.SetWinMapRange(pntai.rect.xmin,pntai.rect.ymin,
                        pntai.rect.xmax,pntai.rect.ymax);
         mychild.ShowModal;
         end
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?