Delphi ʹÓÃ×Ô¶¨ÒåÏûÏ¢
1¡¢ÏÈÓÃConst ¶¨ÒåÒ»¸ö³£Á¿£¬ÀýÈç const WM_MyMessage=WM_USER+$200;
2¡¢ÔÚҪʵÏÖµÄunitÖж¨ÒåÒ»¸ö˽Óз½·¨
procedure doMyMessage(var msg:TMessage);message WM_MyMessage;
3¡¢ÊµÏÖÕâ¸ö˽Óз½·¨
procedure TForm1.doMyMessage(var msg:TMessage);
begin
//
if msg.Msg= WM_MyMessage then
showmessage('ºÃ°¡')
else
showmessage('²»ºÃ');
end;
4¡¢×îÖØÒª °ÑÕâ¸öÏûÏ¢¹ã²¥³öÈ¥ Form1.Perform(WM_MyMessage,0,0);
ÏÂÃæÊÇʵÏֵĴúÂë
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
const WM_MyMessage=WM_USER+$200;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
procedure doMyMessage(var msg:TMessage);message WM_MyMessage;
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.doMyMessage(var msg:TMessage);
begin
//
if msg.Msg= WM_MyMessage then
showmessage('ºÃ°¡')
else
showmessage('²»ºÃ');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Form1.Perform(WM_MyMessage,0,0);
end;
end.
Ïà¹ØÎĵµ£º
ͬ²½³ÌÐò°¸Àý
procedure TGetOrderThread.PostDB(webnr:WideString);
var
Err: String;
SetWebnr:WideString;
xmlDoc: IXMLDocument;
root: IXMLNode;
rowc: IXMLNode;//¼Ç¼Êý
rows: IXMLNodeList;//Ö÷¼Ç¼Áбí
row: IXMLNode;
drows: IXMLNodeList;// ......
ÓÃDelphi×÷µÄ³ÌÐòµÄÔ´´úÂëÖг£¼ûµÄÎļþÀ©Õ¹Ãû£¬²¢¸ø³öÁËÕâЩÎļþÀ©Õ¹ÃûµÄÒâÒ壬ÒÔ±ãÔ´´úÂë¹ÜÀíʱ×÷Ϊ²ÎÕÕ£¬À©Õ¹ÃûÒÔ×ÖĸΪÐò£¨²»ÐèÒª½øÔ´´úÂë¿â²»±íʾ²»ÐèÒª½ø¿â£©¡£
¡¡¡¡~*
¡¡¡¡DelphiÉú³ÉµÄ±¸·ÝÎļþ£¬ÔÚ°æ±¾¿ØÖƿ⼰·¢²¼´úÂëÖв»Ó¦¸Ã³öÏÖÕâЩÎļþ£¬Èç¹ûÐÞ¸ÄÁËij¸öÎļþÈ´ÒòijЩÔÒòûÓб£´æµÄ»°£¬¿ÉÒÔ³¢ÊÔʹÓÃÕâЩÎļþ» ......
TStringsÊÇÒ»¸ö³éÏóÀ࣬ÔÚʵ¼Ê¿ª·¢ÖУ¬ÊdzýÁË»ù±¾ÀàÐÍÍ⣬ӦÓõÃ×î¶àµÄ¡£
³£¹æµÄÓ÷¨´ó¼Ò¶¼ÖªµÀ£¬ÏÖÔÚÀ´ÌÖÂÛËüµÄһЩ¸ß¼¶µÄÓ÷¨¡£
ÏȰÑÒªÌÖÂ۵öÊôÐÔÁгöÀ´£º
1¡¢CommaText
2¡¢Delimiter & DelimitedText
3¡¢Names & Values & ValuefromIndex
ÏÈ¿´µÚÒ»¸ö£ºCommaText¡£ÔõôÓÃÄØ£¿ÓôúÂë˵»°£º
const
......
Day ¿ªÍ·µÄº¯Êý
¡ñ
Unit
DateUtils
function DateOf(const Avalue: TDateTime): TDateTime;
ÃèÊö
ʹÓà DateOf º¯ÊýÓÃÀ´°ÑÒ»¸ö TDateTime ÀàÐ͵ıäÁ¿×ª±ä³ÉÒ»¸ö
Ö»´øÓÐÈÕÆÚµÄ TDateTime ÀàÐͱäÁ¿¡£
ÀýÈ磺
showmessage(DateTimetostr(dateof(now())));
ÄãµÃµ½µÄÊÇ 2003/03/19
¶ø showmessage(DateTime ......