Delphi定时Showmessage事件
在Delphi中,调用Showmessage后,如何使弹出的对话框在一秒钟后自动关闭,而不用手动去点确定
1:用timer控件的函数
procedure TForm1.Timer1Timer(Sender: TObject);
var
AHandle: THandle;
begin
AHandle := FindWindow('TMessageForm',
PChar(Application.Title));
if AHandle > 0 then
SendMessage(AHandle,
WM_CLOSE, 0, 0);
end;
相关文档:
Delphi in a Unicode World Part II: New RTL Features and
Classes to Support Unicode
By: Nick
Hodges
原文链接:http://dn.codegear.com/article/38498
Abstract: This article will cover the new features of the Tiburon
Runtime Library that will help handle Unicode strings.
//
& ......
DELPHI
//////////////////////////////////
Function EncrypKey (Src:String; Key:String):string;
var
idx :integer;
KeyLen :Integer;
KeyPos :Integer; &nbs ......
不论数组元素是什么类型,静态数组的局部变量总会在栈上分配。如果堆栈大小不够将会导致异常。下例暗藏着一个危险的bug
procedure stackover;
var
s:array [0..4100] of string[255];
begin
end;
delphi默认栈最大为$100000字节,上例中的栈上分配的大侠为256*4100>$10000。测试必然会出现异常Stack overf ......