|
|
|
[VB.NET] Help Please... เขียนCode แบบนี้เป็น VB.NET อย่างไรค่ะ^^ |
|
|
|
|
|
|
|
[VB.NET] Help Please... เขียนCode แบบนี้เป็น VB.NET อย่างไรค่ะ^^
http://www.sourcecode.in.th/articles.php?id=43<<<<ตามนี้ค่ะ
Code
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Registry;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var RegIniFile :TRegIniFile;
begin
RegIniFile :=TRegIniFile.Create;
RegIniFile.RootKey :=HKEY_LOCAL_MACHINE;
RegIniFile.WriteString('SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
,'NotePad','C:\Windows\NOTEPAD.EXE');
end;
procedure TForm1.Button2Click(Sender: TObject);
var RegIniFile :TRegIniFile;
begin
RegIniFile :=TRegIniFile.Create;
RegIniFile.RootKey :=HKEY_LOCAL_MACHINE;
RegIniFile.DeleteKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Run','NotePad');
end;
end.
Tag : .NET, VB.NET
|
ประวัติการแก้ไข 2011-12-31 22:17:13
|
|
|
|
|
Date :
2011-12-31 22:15:12 |
By :
nookat |
View :
879 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณค่ะ
|
|
|
|
|
Date :
2012-01-02 19:46:15 |
By :
nookat |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|