function ItemExist(Text:string;TreeView:TTreeView):Boolean;var i: Integer;begin Result:=False; if (Trim(Text)'') then begin for i := 0 to TreeView.Ite...
分类:
其他好文 时间:
2014-07-29 21:41:52
阅读次数:
252
procedure TForm1.TreeView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);var Node: TTreeNode;begin with TreeView1 do begin Node := GetN...
分类:
移动开发 时间:
2014-07-29 21:40:42
阅读次数:
393
procedure TForm1.TreeView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var node: TTreeNode;
begin if Boolean(TreeView1.GetNodeAt(X,Y...
分类:
其他好文 时间:
2014-07-29 21:39:32
阅读次数:
244
描述:log(n)代码: 1 class Solution: 2 # @param x, an integer 3 # @return an integer 4 def getVal(self, begin, end, x): 5 if end == begi...
分类:
其他好文 时间:
2014-07-29 21:26:42
阅读次数:
263
//限制字符的输入{ 只能输入以下字符 }procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);begin If (Key in ['\', '/', ':', '*', '?', '', '|']) then Key := #...
分类:
其他好文 时间:
2014-07-29 21:17:32
阅读次数:
214
EDIT Ini写Ini配置
usesIniFiles; {$R*.dfm} function IniFileName:string;
begin Result:=ExtractFilePath(Application.ExeName)+'Settings.ini';
end;
procedureS...
分类:
其他好文 时间:
2014-07-29 21:17:14
阅读次数:
233
//获得汉字字符个数function ChineseWordsCount(text:string):Integer;var i,sum,e,c,t: Integer;begin Result:=0; c := 0; sum := Length(text); if Sum=0 then exit; f...
分类:
其他好文 时间:
2014-07-29 21:14:32
阅读次数:
211
//关闭计算器 procedure TForm1.Button1Click(Sender: TObject); var HWndCalculator: HWnd; begin HWndCalculator := FindWindow(nil, '计算器'); // 查找计算器句柄 if HWndCa...
分类:
其他好文 时间:
2014-07-29 21:11:22
阅读次数:
186
var s:string='aaa'; s1:string; procedureTForm1.Button1Click(Sender:TObject); begin s1:=Format('确定要删除%s这个文件夹吗?',[s]); ifApplication.MessageBox(PAnsiCha...
分类:
其他好文 时间:
2014-07-29 21:06:42
阅读次数:
221
uses ActiveX;
procedure TForm1.BtnNewClick(Sender: TObject);var ID: TGUID; S: string;begin if CoCreateGuid (Id) = s_OK then begin s := GUIDToString (I...
分类:
其他好文 时间:
2014-07-29 21:06:13
阅读次数:
229