摘要:USE中加上Windows,SysUtils,Dialogs,{$R *.res}varmyMutex:HWND;beginmyMutex:=CreateMutex(nil,false,'docotrFind2011');if WaitForSingleObject(myMutex,0)<>wait_TimeOut thenbegin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end else showmessage('程序已运行,请不要重复
阅读全文
摘要:procedure TForm1.Image1Click(Sender: TObject);//能用过程var S:TObject;begin S:=FindComponent('Timer'+inttostr(TImage(Sender).Tag));//Timer控件 ,名称为 Timer1---到 ---Timer9 if Assigned(s) then ///利用TImage(Sender).Tag查找到 begin if TTimer(s).Enabled then begin TImage(Sender).Picture.Assign(image8.Picture
阅读全文
摘要:实现 QQ面板的两个功能 :1.接近屏幕边缘时,自动隐藏。2. 收缩式面板;一。自动隐藏:procedure TForm1.WMMOVING(var Msg: TMessage);begin inherited; with PRect(Msg.LParam)^ do begin Left := Min(Max(0, Left), Screen.Width - Width); Top := Min(Max(0, Top), Screen.Height - Height); Right := Min(Max(Width, Right), Screen.Width); Bottom := Min(M
阅读全文
摘要:功能大体描述:Form1中有一个Edit和一个Button,当点击BUTTON时弹出FORM2,FORM2中也有一个EDIT和一个BUTTON,当点击FORM2中的BUTTON时,将FORM2中的EDIT的TEXT属性赋值给FORM1中的EDIT的TEXT。 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Clas...
阅读全文
摘要:首先做一窗体,然后将BorderStyle的属性设为bsnone,放image控件,align设为alclient 然后将主程序的修改为 uses Windows, Forms, Unit1 in 'Unit1.pas' {Form1}, Unit2 in 'Unit2.pas' {Form2}; {$ R *.res} begin Application.Initialize; Form2:=T...
阅读全文
摘要:program onlyRunOne;uses Forms,Windows,SysUtils, Dialogs, Unit1 in 'Unit1.pas' {Form1};{$R *.res}varmyMutex:HWND;beginmyMutex:=CreateMutex(nil,false,'11111'); //名称只能全系统唯一。if WaitForSingleObject(myMutex,0)<>wait_TimeOut thenbegin Application.Initialize; Application.CreateForm(TFo
阅读全文
摘要:delphi 用Indy实现FTP客户端 2009-08-21 18:33:07| 分类: Delphi 编程 | 标签: |字号大中小 订阅 讲这个课题的原因,是因为正好我在看“DELPHI 组件经典解析”这本书,里面重点提到的是INDY 9.0 控件的使用。 首先大家了解一下FTP的基本知识:FTP是一个标准协议,它是在计算机和网络之间交换文件的最简单的方法。 FTP也是应用TCP/IP协议的...
阅读全文
摘要:◇[DELPHI]网络邻居复制文件uses shellapi; copyfile(pchar('newfile.txt'),pchar('//computername/direction/targer.txt'),false); ◇[DELPHI]产生鼠标拖动效果通过MouseMove事件、DragOver事件、EndDrag事件实现,例如在PANEL上的LABEL:var xpanel,ypan...
阅读全文