码迷,mamicode.com
首页 >  
搜索关键字:begin    ( 8626个结果
关闭计算器
//关闭计算器 procedure TForm1.Button1Click(Sender: TObject); var HWndCalculator: HWnd; begin HWndCalculator := FindWindow(nil, '计算器'); // 查找计算器句柄 if HWndCa...
分类:其他好文   时间:2014-07-29 21:11:22    阅读次数:186
MessageBox
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
产生不重复的随机数TGUID
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
反转字符串
function ReverseString(s: string): string;var i: integer; s1:string;begin s1 := ''; for i := 1 to Length(s) do s1 := s[i] + s1; Result:=s1;end;procedu...
分类:其他好文   时间:2014-07-29 21:05:32    阅读次数:197
获取windows版本信息
procedure TForm1.Button1Click(Sender: TObject);Var OSVI:OSVERSIONINFO;begin OSVI.dwOSversioninfoSize:=Sizeof(OSVERSIONINFO); GetVersionEx(OSVI); Capti...
分类:Windows程序   时间:2014-07-29 20:43:02    阅读次数:295
bmp to jpg
uses Jpeg;function BMPtoJPG(var BMPpic, JPGpic: string): boolean;var Bitmap: TBitmap; JpegImg: TJpegImage;begin result := False; Bitmap := TBitmap.Cre...
分类:其他好文   时间:2014-07-29 20:42:42    阅读次数:177
label WordWrap
procedure TForm1.FormCreate(Sender: TObject);begin Label1.AutoSize := False; Label1.WordWrap := True; Label1.Text := 'This is my caption that I would ...
分类:其他好文   时间:2014-07-29 20:41:52    阅读次数:309
不在任务栏中显示
procedure TForm1.FormShow(Sender: TObject);begin ShowWindow(Application.handle, SW_HIDE); SetWindowLong(Self.handle, GWL_EXSTYLE, GetWindowLong(Self.h...
分类:其他好文   时间:2014-07-29 20:41:42    阅读次数:218
窗体上打个矩形的洞
step1 在窗体上打个矩形的洞{鼠标可以穿透这个窗体}procedure MakeRectHole(Ctrl:TWinControl;Form:TForm);var Rgn1, Rgn2: HRGN;begin Rgn1 := CreateRectRgn(0,0, Form.Width, Form...
分类:Windows程序   时间:2014-07-29 20:35:42    阅读次数:319
SHGetSpecialFolderLocation
uses shlobj;function GetDesktopFolder():string;var pItem: PItemIDList; temp: array[0..MAX_PATH] of Char;begin SHGetSpecialFolderLocation(0, CSIDL_DESK...
分类:其他好文   时间:2014-07-29 20:34:32    阅读次数:214
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!