在没有IDE的情况下,如何在Delphi中实现Winform对话框? [英] How to implement a winform dialog in Delphi without IDE?
本文介绍了在没有IDE的情况下,如何在Delphi中实现Winform对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我没有安装Delphi IDE.我还能设计表格吗?
I don't have the Delphi IDE installed. Can I still design forms?
推荐答案
使用Win32:档案|这样,您就可以完全控制代码了.
Using Win32: File | New Unit then you have full control of the code.
var
F : TForm;
L : TLabel;
begin
F := TForm.Create(Application);
L := TLabel.Create(F);
L.Parent := F; // Needed to have it show up on the form.
L.Left := 50;
L.Top := 50;
L.Caption := 'This is an example';
F.Show;
end;
在.NET/Delphi Prism中:右键单击项目|新项目|类
In .NET / Delphi Prism: Right Click on the Project|New Item|Class
namespace WindowsApplication2.Properties;
interface
uses
System.Windows.Forms,
System.Collections.Generic,
System.Linq,
System.Text;
type
Class1 = public class(System.Windows.Forms.Form)
private
protected
lablel1 : Label;
public
constructor;
end;
implementation
constructor Class1;
begin
self.label1 := new System.Windows.Forms.Label();
self.SuspendLayout();
self.label1.AutoSize := true;
self.label1.Location := new System.Drawing.Point(37, 80);
self.label1.Name := 'label1';
self.label1.Size := new System.Drawing.Size(35, 13);
self.label1.TabIndex := 0;
self.label1.Text := 'This is an Example';
self.ResumeLayout(false);
self.PerformLayout();
end;
end.
这篇关于在没有IDE的情况下,如何在Delphi中实现Winform对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文