Concat(st1,st2,st3)返回'Brian Wilfred'
。
Length(st);//返回字符串表达式 st 的长度。例如,st:='Brian',则 Length(st)返回值为 5
。
Pos(obj,target);//返回字符串 obj 在目标字符串 target 的第一次出现的位置,如果 target 没有匹配的
串,
Pos 函数的返回值为 0。例如,target:='Brian Wilfred',则 Pos('Wil',target)的返回值是
7,Pos('hurbet',target)的返回值是 0
。
◇[DELPHI]
关于处理注册表
uses Registry;
var reg:Tregistry;
reg:=Tregistry.create;
reg.rootkey:='HKey_Current_User';
reg.openkey('Control Panel\Desktop',false);
reg.WriteString('Title Wallpaper','0');
reg.writeString('Wallpaper',filelistbox1.filename);
reg.closereg;
reg.free;
◇[DELPHI]
关于键盘常量名
VK_BACK/VK_TAB/VK_RETURN/VK_SHIFT/VK_CONTROL/VK_MENU/VK_PAUSE/VK_ESCAPE
/VK_SPACE/VK_LEFT/VK_RIGHT/VK_UP/VK_DOWN
F1--F12:$70(112)--$7B(123)
A-Z:$41(65)--$5A(90)
0-9:$30(48)--$39(57)
◇[DELPHI]
初步判断程序母语
DELPHI 软件的 DOS 提示:This Program Must Be Run Under Win32.
VC++软件的 DOS 提示:This Program Cannot Be Run In DOS Mode.
◇[DELPHI]操作 Cookie
response.cookies("name").domain:='http://www.086net.com';
with response.cookies.add do
begin
name:='username';
value:='username';
end
◇[DELPHI]
增加到文档菜单连接
uses shellapi,shlOBJ;
shAddToRecentDocs(shArd_path,pchar(filepath));//
增加连接
shAddToRecentDocs(shArd_path,nil);//
清空
◇[杂类]备份智能 ABC
输入法词库
windows\system\user.rem
windows\system\tmmr.rem
◇[DELPHI]
判断鼠标按键
if GetAsyncKeyState(VK_LButton)<>0 then ... //
左键
if GetAsyncKeyState(VK_MButton)<>0 then ... //
中键
if GetAsyncKeyState(VK_RButton)<>0 then ... //
右键
◇[DELPHI]
设置窗体的最大显示
onFormCreate
事件
self.width:=screen.width;
self.height:=screen.height;
◇[DELPHI]
按键接受消息
OnCreate 事件中处理:Application.OnMessage:=MyOnMessage;
procedure TForm1.MyOnMessage(var MSG:TMSG;var Handle:Boolean);
begin