上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 49 下一页
摘要: {删除文件到回收站} //iffileexists('d:\a.txt')thenRecycleFile('d:\a.txt'+#0); //usesshellapi; functionRecycleFile(sFileName:string):Boolean; var FOS:TSHFileOpStruct; begin FillChar(FOS,SizeOf(FOS),0); withFOSd... 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(297) 评论(0) 推荐(0)
摘要: {让窗体全屏显示} //SetFormFullScreen(Form1); procedureSetFormFullScreen(Form:TForm); begin Form.BorderStyle:=bsNone; Form.WindowState:=wsMaximized; Form.Color:=clBlack; end; 通过 为知笔记 发布 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(327) 评论(0) 推荐(0)
摘要: {不重复添加Edit1.text到列表框中} //调用ListBoxAddItems(Edit1,ListBox1); procedureListBoxAddItems(Edit:TEdit;ListBox:TListBox); begin ifListBox.Items.IndexOf(Edit.Text)<0then begin ListBox.Items.Add(Edit.Text); Edit.SetFocus; end; end; 通过 为知笔记 发布 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(279) 评论(0) 推荐(0)
摘要: {对listbox中的整型数据重小到大排序并返回最小值} //调用sortListBox(ListBox1); //listbox的项目必须能转换成整型的数值functionsortListBox(ListBox:TListBox):integer; var I,J:Integer; temp:string; beginifListBox.Items.Count=0thenExit;withLis... 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(222) 评论(0) 推荐(0)
摘要: {使Edit控件中只能输入数字和1个小数点} //调用放在Edit的KeyPress事件下setOnePoint(Key,Edit1); procedureSetEditOnePoint(varKey:Char;CTRL:Tedit); varp:integer;tp:TPoint; begin ifkeyin['0'..'9','+','-','.']then begin ifkeyin['+'... 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(308) 评论(0) 推荐(0)
摘要: usesIniFiles;//引用IniFiles {$R*.dfm} {写入信息到ini文件} //WriteEdit('Config.ini','Options','Edit',Edit1); procedureWriteEdit(fileName:string;section:string;Ident:string;Edit:TEdit); varINIFILE:TIniFile; begi... 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(227) 评论(0) 推荐(0)
摘要: uses IniFiles;//引用IniFiles{写入信息到ini文件} //WriteformState('Config.ini','MainForm',Form1) procedureWriteformState(fileName:string;section:string;form:TForm); varINIFILE:TIniFile; begin INIFILE:=TIniFile.... 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(170) 评论(0) 推荐(0)
摘要: uses IniFiles; {写入Memo中的项目到ini中} //调用WriteMemoItems('settings.ini','MEMO',Memo1); procedureWriteMemoItems(constAINIFile,ASection:string;MEMO:TMemo); var INI:TINIFile; iniPath:string;//ini路径 I:Integer;... 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(262) 评论(0) 推荐(0)
摘要: usesIniFiles; {写入列表框中的项目到ini中} //调用WriteListBoxItems('settings.ini','Listbox',ListBox1); procedureWriteListBoxItems(constAINIFile,ASection:string;ListBox:TListBox); var INI:TINIFile; iniPath:string;//... 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(180) 评论(0) 推荐(0)
摘要: usesRegistry; {ReadStrFormRegRegistry} //调用ReadStrFormReg('TEST',Edit1); procedureWriteStrToReg(SectionStr:string;Edit:TEdit); var Reg:TRegistry; keyName:string; begin Reg:=TRegistry.Create; Reg.RootK... 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(130) 评论(0) 推荐(0)
摘要: {shutdown -s -t 0 立即关闭计算机shutdown -l 立即注销计算机shutdown -r -t 0 立即重启计算机shutdown -a 取消关闭计算机}{在uses中引入 ShellAPI} uses ShellAPI;{关机相关}//调用//Shutdown(0);procedure Shutdown(sType:integer);begincasesType of0: ShellExecute(Application.Handle, 'open', 'shutdown.exe', '-s -t 0', 0, SW_SH 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(280) 评论(0) 推荐(0)
摘要: //------------------------------------------function Enc(Str:String):String;{加密} function Dec(Str:String):String;{解密} //------------------------------------------{字符加密} //调用Edit1.Text:=Enc(Edit1.Text);//加密 functionEnc(Str:String):String; constXorKey:array[0..7]ofByte=($B2,$09,$AA,$55,$93,$6D,$84,$47 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(1410) 评论(0) 推荐(0)
摘要: {得到文件的大小 KB}//调用返回值:=GetFileSize(application.ExeName);functionGetFileSize(constFileName:string):string; var SR:TSearchRec; begin Result:='-1'; ifFindFirst(FileName,faAnyFileand(notfaDirectory),SR)=0th... 阅读全文
posted @ 2012-07-26 08:49 XE2011 阅读(1280) 评论(0) 推荐(0)
摘要: {删除自己} //DeleteMe; //close; procedureDeleteMe(); var bf:TextFile; bf1:string; pf:TProcessInformation; sf:TStartupInfo; begin bf1:=ExtractFilePath(ParamStr(0))+'_deleteme.bat'; AssignFile(bf,bf1); Rewr... 阅读全文
posted @ 2012-07-26 08:48 XE2011 阅读(762) 评论(0) 推荐(0)
摘要: C++Builder建立及调用DLL第1章 C++Builder6概述11.1 初识C++Builder6的可视化开发环境11.2C++Builder6快速入门41.2.1C++Builder6的第一个示例——“欢迎进入奇妙的C++Builder世界!”41.2.2 C++Builder的工程概述81.3面向对象编程的基本概念91.3.1面向对象的程序设计91.3.2类、对象、属性、方法91.3.... 阅读全文
posted @ 2012-07-16 16:07 XE2011 阅读(494) 评论(0) 推荐(0)
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 49 下一页