很希望大家把自己做项目中的小技巧共享出来解决方案
很希望大家把自己做项目中的小技巧共享出来
很久没有在****首页看到Delphi的技术分享贴了,大家努力啊~
------解决方案--------------------
不错~板凳~~
------解决方案--------------------
不错~地板~~
------解决方案--------------------
使用bcb6开发,开发包提供的是vc6开发的dll和lib文件,使用bcb6 bin目录下的工具:coff2omf a.lib b.lib
将库文件a.lib转换格式生成库文件b.lib
coff2omf可以转换微软的COFF格式为Borland使用的OMF格式
在bcb6中导入即可直接调用了!
另外:tdump -ee mydll.dll >1.txt
研究一下别的程序或者dll里边调用了什么函数
------解决方案--------------------
D7以上版本的indy提供的IdStrings.pas里面有几个很有用处的字符处理函数
------解决方案--------------------
不错
------解决方案--------------------
不错,呵呵
------解决方案--------------------
我来顶了~~~呵呵,接点分
------解决方案--------------------
呵呵,偶以前提过这样的问题,结果也是没有多少人参与
------解决方案--------------------
up,go on study!
------解决方案--------------------
友情关注。
------解决方案--------------------
向前拱
------解决方案--------------------
up, 偶先想想再回。
------解决方案--------------------
up
------解决方案--------------------
上首页了,过来看看...
------解决方案--------------------
我认为自己最能拿出手的东西,
可以做个基类使用,主要功能就是是子类的用户输入控件可以自动变色,
不必考虑种类繁多的第三方控件,
只要是有Color,OnEnter,OnExit,OnChange属性就行。
unit Ufrmbase;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons,typinfo;
type
Tfrmbase = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure CmpEnter(Sender: TObject); //用户获得焦点
procedure CmpExit(Sender: TObject); //用户失去焦点
public
{ Public declarations }
protected
procedure pSetComponents;
end;
var
frmbase: Tfrmbase;
//以后应该是可以设置的。风格管理,可以保存在注册表中
const
ENTERC0LOR = $00CDBDB4;
EXITCOLOR = $00DAF3DD;
implementation
{$R *.dfm}
procedure Tfrmbase.CmpEnter(Sender: TObject);
var
sProp: PPropInfo;
begin
sProp := GetPropInfo(Sender.ClassInfo, 'Color');
if sProp <> nil then
SetOrdProp(Sender, sProp, ENTERC0LOR);
end;
procedure Tfrmbase.CmpExit(Sender: TObject);
var
sProp: PPropInfo;
begin
sProp := GetPropInfo(Sender.ClassInfo, 'Color');
if sProp <> nil then
SetOrdProp(Sender, sProp, EXITCOLOR);
end;
procedure Tfrmbase.pSetComponents;
var
i: Integer;
sColor, sEnter, sExit, sChanged: PPropInfo;
vEnter, vExit: TMethod;
mEvent: TNotifyEvent;
begin
for i := 0 to componentcount - 1 do
begin
sColor := GetPropInfo(Components[i].ClassInfo, 'Color');
sEnter := GetPropInfo(Components[i].ClassInfo, 'OnEnter');
sExit := GetPropInfo(Components[i].ClassInfo, 'OnExit');
sChanged := GetPropInfo(Components[i].ClassInfo, 'OnChange');
if (sChanged <> nil) and (sEnter <> nil) and
(sExit <> nil) and (sColor <> nil) then
begin
SetOrdProp(Components[i], sColor, EXITCOLOR);
很久没有在****首页看到Delphi的技术分享贴了,大家努力啊~
------解决方案--------------------
不错~板凳~~
------解决方案--------------------
不错~地板~~
------解决方案--------------------
使用bcb6开发,开发包提供的是vc6开发的dll和lib文件,使用bcb6 bin目录下的工具:coff2omf a.lib b.lib
将库文件a.lib转换格式生成库文件b.lib
coff2omf可以转换微软的COFF格式为Borland使用的OMF格式
在bcb6中导入即可直接调用了!
另外:tdump -ee mydll.dll >1.txt
研究一下别的程序或者dll里边调用了什么函数
------解决方案--------------------
D7以上版本的indy提供的IdStrings.pas里面有几个很有用处的字符处理函数
------解决方案--------------------
不错
------解决方案--------------------
不错,呵呵
------解决方案--------------------
我来顶了~~~呵呵,接点分
------解决方案--------------------
呵呵,偶以前提过这样的问题,结果也是没有多少人参与
------解决方案--------------------
up,go on study!
------解决方案--------------------
友情关注。
------解决方案--------------------
向前拱
------解决方案--------------------
up, 偶先想想再回。
------解决方案--------------------
up
------解决方案--------------------
上首页了,过来看看...
------解决方案--------------------
我认为自己最能拿出手的东西,
可以做个基类使用,主要功能就是是子类的用户输入控件可以自动变色,
不必考虑种类繁多的第三方控件,
只要是有Color,OnEnter,OnExit,OnChange属性就行。
unit Ufrmbase;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons,typinfo;
type
Tfrmbase = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure CmpEnter(Sender: TObject); //用户获得焦点
procedure CmpExit(Sender: TObject); //用户失去焦点
public
{ Public declarations }
protected
procedure pSetComponents;
end;
var
frmbase: Tfrmbase;
//以后应该是可以设置的。风格管理,可以保存在注册表中
const
ENTERC0LOR = $00CDBDB4;
EXITCOLOR = $00DAF3DD;
implementation
{$R *.dfm}
procedure Tfrmbase.CmpEnter(Sender: TObject);
var
sProp: PPropInfo;
begin
sProp := GetPropInfo(Sender.ClassInfo, 'Color');
if sProp <> nil then
SetOrdProp(Sender, sProp, ENTERC0LOR);
end;
procedure Tfrmbase.CmpExit(Sender: TObject);
var
sProp: PPropInfo;
begin
sProp := GetPropInfo(Sender.ClassInfo, 'Color');
if sProp <> nil then
SetOrdProp(Sender, sProp, EXITCOLOR);
end;
procedure Tfrmbase.pSetComponents;
var
i: Integer;
sColor, sEnter, sExit, sChanged: PPropInfo;
vEnter, vExit: TMethod;
mEvent: TNotifyEvent;
begin
for i := 0 to componentcount - 1 do
begin
sColor := GetPropInfo(Components[i].ClassInfo, 'Color');
sEnter := GetPropInfo(Components[i].ClassInfo, 'OnEnter');
sExit := GetPropInfo(Components[i].ClassInfo, 'OnExit');
sChanged := GetPropInfo(Components[i].ClassInfo, 'OnChange');
if (sChanged <> nil) and (sEnter <> nil) and
(sExit <> nil) and (sColor <> nil) then
begin
SetOrdProp(Components[i], sColor, EXITCOLOR);