Delphi創(chuàng)建開機(jī)啟動(dòng)項(xiàng)的方法示例
更新時(shí)間:2014年07月29日 08:59:40 投稿:shichen2014
這篇文章主要介紹了Delphi創(chuàng)建開機(jī)啟動(dòng)項(xiàng)的方法,很有實(shí)用價(jià)值,需要的朋友可以參考下
Delphi可以通過創(chuàng)建開機(jī)啟動(dòng)項(xiàng)鍵值的方法,將程序添加到開機(jī)啟動(dòng)項(xiàng)中。通過本實(shí)例代碼就可以為您的程序添加到快速啟動(dòng)中,隨著Windows一起啟動(dòng),開機(jī)即運(yùn)行的程序。該實(shí)例代碼簡(jiǎn)單,主要是通過添加注冊(cè)表鍵值來實(shí)現(xiàn)。
具體的功能代碼如下所示:
unit dy97; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs,registry, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Label1: TLabel; Image1: TImage; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } procedure zdyx(a,b: string;c: boolean); end; var Form1: TForm1; implementation {$R *.dfm} { TForm1 } procedure TForm1.zdyx(a, b: string; c: boolean); var d: string; e: TReginiFile; begin if c then d := 'once' else d:= ''; e := TRegIniFile.Create(''); e.RootKey := HKEY_LOCAL_MACHINE; e.WriteString('software\microsoft\windows\currentversion\run'+d +#0,a,b); e.Free ; end; procedure TForm1.FormCreate(Sender: TObject); begin self.zdyx('ZDYX',application.ExeName,false); end; end.
您可能感興趣的文章:
- Delphi7中群發(fā)Email郵件的方法
- delphi實(shí)現(xiàn)保存和讀取圖片的方法
- Delphi遠(yuǎn)程連接Mysql的實(shí)現(xiàn)方法
- Delphi實(shí)現(xiàn)獲取句柄并發(fā)送消息的方法
- Delphi實(shí)現(xiàn)木馬自我拷貝方法
- Delphi實(shí)現(xiàn)窗口文字淡入淡出漸變效果的方法
- Delphi實(shí)現(xiàn)獲取磁盤空間大小的方法
- Delphi中對(duì)時(shí)間操作方法匯總
- delphi7連接mysql5的實(shí)現(xiàn)方法
- delphi實(shí)現(xiàn)將BMP格式圖形轉(zhuǎn)化為JPG格式圖形的方法
相關(guān)文章
截取指定符號(hào)之間的字符串(隨機(jī)讀取)delphi實(shí)例代碼
這篇文章主要介紹了截取指定符號(hào)之間的字符串(隨機(jī)讀取)delphi實(shí)例代碼,有需要的朋友可以參考一下2013-12-12Delphi實(shí)現(xiàn)圖像文本旋轉(zhuǎn)特效完整實(shí)例代碼
這篇文章主要介紹了Delphi實(shí)現(xiàn)圖像文本旋轉(zhuǎn)特效完整實(shí)例代碼,對(duì)于幫助讀者進(jìn)一步理解Delphi圖形及文字特效的處理有一定的借鑒價(jià)值,需要的朋友可以參考下2014-07-07