日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

Delphi编程之系统OEM DIY

發布時間:2025/3/15 windows 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Delphi编程之系统OEM DIY 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

具體代碼如下:

//轉載請注明出處 unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, ExtCtrls, StdCtrls, ExtDlgs,Registry;typeTForm1 = class(TForm)GroupBox1: TGroupBox;Label1: TLabel;Edit1: TEdit;Label2: TLabel;Edit2: TEdit;Label3: TLabel;Edit3: TEdit;Label4: TLabel;Edit4: TEdit;Button1: TButton;GroupBox2: TGroupBox;Button2: TButton;Button3: TButton;Button4: TButton;Button5: TButton;Button6: TButton;Label6: TLabel;Edit5: TEdit;Label7: TLabel;Edit6: TEdit;OpenPictureDialog1: TOpenPictureDialog;Image1: TImage;Label5: TLabel;procedure Button1Click(Sender: TObject);procedure Button2Click(Sender: TObject);procedure Button3Click(Sender: TObject);procedure Button5Click(Sender: TObject);procedure Button6Click(Sender: TObject);procedure Button4Click(Sender: TObject);private{ Private declarations }public{ Public declarations }end;varForm1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject); begin if (Edit1.Text='') and (Edit2.Text='') and (Edit3.Text='') and (Edit4.Text='') and (Edit5.Text='') then MessageBox(0,'您還沒有填寫相關信息呢!','提示信息',64) else Edit1.Clear; Edit2.Clear; Edit3.Clear; Edit4.Clear; Edit5.Clear end;procedure TForm1.Button2Click(Sender: TObject); begin if OpenPictureDialog1.Execute then Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName); Edit6.Text:= ExtractFileDir(OpenPictureDialog1.FileName)+'\'+ExtractFileName(OpenPictureDialog1.FileName); end;procedure TForm1.Button3Click(Sender: TObject); begin if Image1.Picture.Bitmap.Empty then MessageBox(0,'您還沒有載入圖片呢!','提示信息',64) else Image1.Picture.Bitmap:=nil; end;procedure TForm1.Button4Click(Sender: TObject); begin MessageBox(0,'作者:過往云霄 QQ:154103651'+#13+#13'操作系統:Windows 10簡體中文專業版64位'+#13+#13'編程工具:Delphi 2010英文架構師版','提示信息',64); end;procedure TForm1.Button5Click(Sender: TObject); var Reg:TRegistry; begin Reg:=TRegistry.Create; tryReg.Access:=KEY_WOW64_64KEY or KEY_WRITE;Reg.RootKey:=HKEY_LOCAL_MACHINE;if Reg.OpenKey('SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation',True) thenbeginReg.WriteString('Manufacturer',Edit1.Text);Reg.WriteString('Model',Edit2.Text);Reg.WriteString('SupportHours',Edit3.Text);Reg.WriteString('SupportPhone',Edit4.Text);Reg.WriteString('SupportURL',Edit5.Text);//Reg.WriteString('Logo',ExtractFileName(OpenPictureDialog1.FileName)); 獲得文件名稱Reg.WriteString('Logo',ExtractFileDir(OpenPictureDialog1.FileName)+'\'+ExtractFileName(OpenPictureDialog1.FileName));Reg.CloseKey;end; finally Reg.Free; end; end;procedure TForm1.Button6Click(Sender: TObject); begin Close; end;end.

?

轉載于:https://www.cnblogs.com/guowangyunxiao/p/5287408.html

總結

以上是生活随笔為你收集整理的Delphi编程之系统OEM DIY的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。