如何将窗体做成dll

truelove 2000-07-27 01:12:00
如何将窗体做成dll
...全文
157 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
kith 2000-07-28
  • 打赏
  • 举报
回复
这个例子够了吧?
PAS文件:
unit dll;

interface

uses
WinTypes, Classes, Controls, StdCtrls,WinProcs,Graphics,Forms,Buttons,SysUtils;

type
Tpasswordform = class(TForm)
Edit1: TEdit;
Button1: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
function GetPassword(Password:string):Boolean;export;
implementation
uses Dialogs;
{$R *.DFM}
function GetPassword(Password:string):Boolean;
var
PasswordForm:TPasswordForm;
begin
Result:=False;
PasswordForm:=TPasswordForm.Create(Application);
try
with PasswordForm do
if ShowModal=mrOK then
if UpperCase(Edit1.Text)<> UpperCase(Password)then
MessageDlg('InvalidPassword',mtWarning,[mbOK],0)
else
Result:=True;
finally
PasswordForm.Free;
end;
end;


end.

DPR文件:
library dllform;



uses
SysUtils,
Classes,
dll in 'dll.pas' {passwordform};
exports getpassword;
{$R *.RES}

begin
end.
icefireren 2000-07-28
  • 打赏
  • 举报
回复
我的email addr icefire@ehousee.com
icefireren 2000-07-28
  • 打赏
  • 举报
回复
wingsun能给我一个例子吗!
zsr 2000-07-27
  • 打赏
  • 举报
回复
delphi的帮助里就有一个例子!
Wingsun 2000-07-27
  • 打赏
  • 举报
回复
接着
truelove 2000-07-27
  • 打赏
  • 举报
回复
要呀!
Wingsun 2000-07-27
  • 打赏
  • 举报
回复
我有一个例子,要吗?

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧