我想在dll中放置已经做好的的窗体!(37)

  • 主题发起人 主题发起人 坐井看天阔
  • 开始时间 开始时间

坐井看天阔

Unregistered / Unconfirmed
GUEST, unregistred user!
我想在dll中放置已经做好的的窗体,按上面的方法建立了但出错,请高手指教!非常感谢先!勿见笑,初学dll者!library Project2;uses SysUtils, Classes, Unit1 in 'Unit1.pas';exportsCreateform name 'Myform';{$R *.res}beginend.------------------------unit Unit1;interface//----------------------------------------------function Createform(capt:string):string;stdcall;//----------------------------------------------uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;type TForm1 = class(TForm) Button1: TButton; GroupBox1: TGroupBox; Label1: TLabel; private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation//----------------------------------------------function Createform(capt:string):string;stdcall;varForm1: TForm1;begin form1:=Tform1.Create(application); form1.show; form1.caption:=capt;end;//-----------------------------------------------{$R *.dfm}end.我在编译成dll时出现如下错误,请教如何解决!谢谢大侠们!所有分献上,虽少心诚![Error] Unit1.pas(7): Declaration expected but 'USES' found[Error] Unit1.pas(12): Undeclared identifier: 'TForm'[Error] Unit1.pas(13): Undeclared identifier: 'TButton'[Error] Unit1.pas(14): Undeclared identifier: 'TGroupBox'[Error] Unit1.pas(15): Undeclared identifier: 'TLabel'[Error] Unit1.pas(32): Too many actual parameters[Error] Unit1.pas(33): Undeclared identifier: 'show'[Error] Unit1.pas(34): Undeclared identifier: 'caption'[Fatal Error] Project2.dpr(16): Could not compile used unit 'Unit1.pas'能否在给些建议!
 
已解决,谢谢!
 
多人接受答案了。
 

Similar threads

I
回复
0
查看
502
import
I
I
回复
0
查看
740
import
I
S
回复
0
查看
751
SUNSTONE的Delphi笔记
S
I
回复
0
查看
650
import
I
后退
顶部