[DELPHI]網絡鄰居複製文件

來源:瑞文範文網 1.52W

◇[delphi]網絡鄰居複製文件

[DELPHI]網絡鄰居複製文件

uses shellapi;

copyfile(pchar(''''),pchar(''//computername/direction/''),false);

◇[delphi]產生鼠標拖動效果

通過mousemove事件、dragover事件、enddrag事件實現,例如在panel上的label:

var xpanel,ypanel,xlabel,ylabel:integer;

panel的mousemove事件:xpanel:=x;ypanel:=y;

panel的dragover 事件:xpanel:=x;ypanel:=y;

label的mousemove事件:xlabel:=x;ylabel:=y;

label的enddrag 事件::=xpanel-xlabel;:=ypanel-ylabel;

◇[delphi]取得windows目錄

uses shellapi;

var windir:array[0..255] of char;

getwindowsdirectory(windir,sizeof(windir));

或者從註冊表中讀取,位置:

hkey_local_machinesoftwaremicrosoftwindowscurrentversion

systemroot鍵,取得如:c:windows

熱門標籤