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.
//
& ......
var
arrChar : array [0..4] of Char;
b : Byte;
s : string;
begin
s := 'Test';
Move(Pointer(s)^, arrChar, Length(s)); //string to array of char
ShowMessage(arrChar);
b := Ord(s[1]); //First byte string to one single byte
......
使用delphi多年,前些天忽然遇到不会string转pbyte,很是失落,此时对于编程基本功的重要性深有体会.这其中用到MOVE函数.
搞了好一会才搞明白其用法.所以想贴出来帮助需要帮助的人.
var
s:string;
ps:Pchar;
b:pbyte;
len:integer;
begin
&nb ......
今天项目组发生一个事情就是,后台aix上对多语言文本(英语+汉字)换行问题搞不太清楚。
最早前台的多字符的代码我检查了一下(按照0-128以外算中文的代码)发现不是安全的代码。
(delphi 7.0)
delphi安全的混合字符的操作方法是:
在strsUtils单元中
leftstr
MidStr
Rightstr
aix下是: ......
在Delphi中Ado系列控件使用xxxxx.Parameters.Refresh,可以获得存储过程的Return值
以TADOStoredProc为例
ADOStoredProc1.Connection := 'xxxx';
ADOStoredProc1.ProcedureName := 'XXXX';
ADOStoredProc1.Parameters.Refresh; //刷新存储过程的参数列表
//参数赋值
ADO ......