在设置窗体中 chkAutoStart: TCheckBox; 在设置窗体中 chkAutoStart: TCheckBox; procedure TFrmSetup.FormCreate(Sender: TObject); Var s:String; _RootKey: HKEY; _Localkey: String; begin {$ifdef Proxy} btnAbout.Enabled :=False; {$endif} _RootKey:=HKEY_LOCAL_MACHINE; _L…
在dos 下用命令启动一个服务:NET START "Windows Desktop Reminder" 一下为用delphi启动服务: Function RunProcess(sApp,sPara:String):Boolean; begin ZeroMemory(@sStartInfo, sizeof(sStartInfo)); SStartInfo.cb := sizeof(sStartInfo); begin SStartInfo.dwX:=0; SStartInfo.dwY…
1.计算软件启动了多长时间:用定时器,每分钟触发一次: procedure TFrmMain.tmCheckLegalTimer(Sender: TObject);Var Minutes:LongInt; NewDay:String;begin Minutes:=MyReg.ReadInteger('Minute'); Inc(Minutes); FrmSetUp.lbRunTime.Caption :=Format('%d天 %2.2d小时 %2.2d分钟', [Minutes div 60…
procedure TFrmPlay.mnDeskPicClick(Sender: TObject); Var s:String; i:Integer; begin //s:=Path+'SetPic.exe'; //EnableDebugPrivilege(True); //ShellExecute(GetDesktopWindow ,'open',Pchar(s), nil,Pchar(Path),SW_SHow); Exit; i:=sgPic.Row; s:=sgPic.Cells[,i…
private //窗体移动: OldPos,NewPos:TPoint; bMove:Boolean; procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin bMove:=True; OldPos:=ClientToScreen(Point(X,Y)); end; procedure TForm1.FormMouseMove(…
打开一个配置文件: 打开一个配置文件 操作TStringGrid Procedure EmptyGrid(Var sg:TStringGrid); Var i:Integer; begin do sg.Rows[i].clear; sg.RowCount :=; end; Procedure SetGridTitle(Var SG:TStringGrid; sTil:array of String); Var i,l,h:integer; begin l:=Low(sTil); h:=High(…
http://blog.csdn.net/delphi308/article/details/9906147 delphi开发实例:保存字体设置的方法 2013-08-11 22:37 446人阅读 评论(0) 收藏 举报  分类: Delphi(59)  记得一年前软件里面用到字体设置时,想把字体信息保存到配置文件里面都是把相应的属性分开来保存一下,这样一直使用,最近想delphi自己的dfm文件也同样会保存这些信息,它又是怎样保存的呢.. 用记事本打开dfm文件会看到类似这样的文本: obj…
之前因为乱按网上的设置导致启动avd启动黑屏,查了很久原来是ANDROID_AVD_HOME变量没有加$符号 以下是正确的环境变量配置 添加环境变量(注意avd中有一个$符号) ANDROID_SDK_HOME=(sdk)C:\Users\zhouwei\AppData\Local\Android\sdk $ANDROID_AVD_HOME=(sdk)C:\Users\zhouwei\AppData\Local\Android\sdk Path下加以下二个 (sdk)C:\Users\zhouw…
Delphi开发经验谈 开发环境-------- Delphi 7是一个很经典的版本,在Win2000/XP下推荐安装Delphi 7来开发软件,在Vista下推荐使用Delphi 2007开发软件.安装好Delphi 7后,应立即安装Delphi 7 Update Pack 1,Delphi 2007则建议尽量安装最新的版本.工欲善其事,必先利其器,为了提升开发效率,为了能更加得心应手的处理接下来的开发工作,我们有必要安装一些有用的开发辅助工具(Delphi将此类插件以Expert命名).首先…
开机自动启动nginx 1.    扔脚本进去/etc/init.d/ 2.    授权     chmod +x nginx 3.    一旦抛出:binsh^M错误就执行编码改写     设置dos统一编码     (请看nginx脚本抛出binsh^M bad interpreter文档) 4.    添加到服务     chkconfig --add ningx          5.    随机启动脚本带动nginx开机启动     chkconfig --level 2345 ngi…