在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
library plug_in;
{要加载的窗体} unit Unit3; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,ADODB, DB, Grids, DBGrids; type TForm3 = class(TForm) Button1: TButton; ADOQuery1: TADOQuery; DBGrid1: TDBGrid; DataSource1: TDataSource; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form3: TForm3; ADO: TADOConnection; function GetName:string;StdCall; function GetForm(AHandle:THandle;adoconn:TADOConnection;ACaption:String):BOOL;StdCall; implementation {$R *.dfm} function GetName:string; begin result:='my dll'; end; function GetForm(AHandle:THandle;adoconn:TADOConnection;ACaption:String):BOOL; var ShowForm:TForm3; begin Application.Handle:=AHandle; ADO:= adoconn; ShowForm :=TForm3.Create(Application); try if ACaption<>'' then ShowForm.Caption:=ACaption; ShowForm.ShowModal; Result:=False; finally ShowForm.Free; end; end; procedure TForm3.Button1Click(Sender: TObject); begin self.ADOQuery1.Connection:=ADO; with self.ADOQuery1 do begin Connection:=ADO; close; SQL.Clear; SQL.Add('select top 1 * from master'); open; end; end; end. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论