摘要: 先人的DELPHI基础开发技巧 ◇[DELPHI]网络邻居复制文件 uses shellapi; copyfile(pchar('newfile.txt'),pchar('//computername/direction/targer.txt'),false);◇[DELPHI]产生鼠标拖动效果 通过MouseMove事件、DragOver事件、EndDrag事件实现,例如在PANEL上的LABEL: var xpanel,ypanel,xlabel,ylabel:integer; PANEL的MouseMove事件:xpanel:=x;ypanel:=y; P 阅读全文
posted @ 2013-11-19 08:57 麦麦提敏 阅读(541) 评论(0) 推荐(0) 编辑
摘要: Q: 怎么来改变ListBox的字体呢?就修改其中的一行。A: 先把ListBox1.Style 设成lbOwnerDrawFixed然后在 OnDrawItem 事件下写下如下代码procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;Rect: TRect; State: TOwnerDrawState);varOffset: Integer;beginOffset := 2;with (Control as TListBox).Canvas do beginFillRect(Rect);if Index 阅读全文
posted @ 2013-11-19 08:54 麦麦提敏 阅读(372) 评论(0) 推荐(0) 编辑
摘要: ------------------------------------------------------- ◇删掉程序自己的exe文件 procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); var F:TextFile; begin AssignFile(F,'delself.bat'); Rewrite(F);{F为TextFile类型} WriteLn(F,'del '+ExtractFileName(Application.ExeName)); WriteLn(F, 阅读全文
posted @ 2013-11-19 08:50 麦麦提敏 阅读(297) 评论(0) 推荐(0) 编辑