Delphi 实现程序 动态 类名
1、首先将delphi中Controls单元提取
2、修改Controls单元中如下部分:
procedure TWinControl.CreateParams(var Params: TCreateParams);
begin
FillChar(Params, SizeOf(Params), 0);
with Params do
begin
Caption := FText;
Style := WS_CHILD or WS_CLIPSIBLINGS;
AddBiDiModeExStyle(ExStyle);
if csAcceptsControls in ControlStyle then
begin
Style := Style or WS_CLIPCHILDREN;
ExStyle := ExStyle or WS_EX_CONTROLPARENT;
end;
if not (csDesigning in ComponentState) and not Enabled then
Style := Style or WS_DISABLED;
if FTabStop then Style := Style or WS_TABSTOP;
X := FLeft;
Y := FTop;
Width := FWidth;
Height := FHeight;
if Parent <> nil then
WndParent := Parent.GetHandle else
WndParent := FParentWindow;
WindowClass.style := CS_VREDRAW + CS_HREDRAW + CS_DBLCLKS;
WindowClass.lpfnWndProc := @DefWindowProc;
WindowClass.hCursor := LoadCursor(0, IDC_ARROW);
WindowClass.hbrBackground := 0;
WindowClass.hInstance := HInstance;
//////////////////
StrPCopy(WinClassName, IntToStr(GetTickCount));
//StrPCopy(WinClassName, ClassName);
end;
end;
本文来自Delphi之窗,原文地址:http://www.52delphi.com
相关文档:
http://www.delphibbs.com/delphibbs/dispq.asp?LID=2421470
本文是《Delphi 的RTTI机制浅探》的续篇,上篇地址在:
http://www.delphibbs.com/delphibbs/dispq.asp?lid=2420610
本文上篇基本上是
RTTI 入门介绍,续篇介绍了所有 TypInfo.pas 中的函数,附加了 Classes.pas、Graphics.pas、Controls.pas
中的 ......
//**************需要强调的两个快捷键**********************
51.CTRL+SHIFT+U 代码整块左移2个空格位置
52.CTRL+SHIFT+I 代码整块右移2个空格位置
60.Ctrl+Alt+c 注释块
61.Ctrl+Alt+u & ......
Delphi 是新一代可视化开发工具,它具有功能强大、简便易用和代码执行速度快等特点,是全球公认的快速应用开发工具技术的先驱者,它越来越在构架企业信息系统方面发挥着重要作用。由于Delphi 这些显著特点,许多程序员选择Delphi作为开发工具编制各种应用程序。但是,令人惋惜的是Delphi没有自带串口 ......
方法一:
直接弹出UDL对话框:
use
ADOConed;
EditConnectionString(ADOQuery1);
方法二:
⑴、右键---新建---文本文档,重命名为 connSet.udl 。
⑵、双击打开 connSet.udl 按提示操作配置数据库,选择本地或远程数据库,配置好后退出。
⑶、使用Delphi 控件TADOConnection连接代码:
在Form ......