什么启动项目 ? windows 的?
解决方案 »
- 使用ADO数据接口恢复SQL Server 2005数据库失败
- DELPHI编写的active x在java中调用的问题?
- 如何程序更改屏幕的象素点的颜色位数,如16bits/pixel 32bits/pixel
- 数据问题
- 有一个问题(关于将子窗体嵌入父窗体的容器里)
- 为什么我的PROJECT老是报错:Access violation at address ......
- 如何在DELPHI中得到SQL-SERVER当前的日期时间
- 一个奇怪的下载问题!
- dbgrid控件如何用代码绑定数据库
- ***ADOTABLE的“变量查询”的困惑?《=====
- ADOTable的Filter的动态改变问题
- 誰知道怎樣在Sql把char類型轉換成datetime類型
procedure TForm1.Button2Click(Sender: TObject);
var
reg:Tregistry;
begin
reg:=Tregistry.Create;
reg.RootKey:=hkey_current_user;
reg.OpenKey('CONTROL PANEL',false);
reg.GetKeyNames(Listbox1.Items);
reg.free;
end;
var
Myreg : TRegistry;
begin
MyReg := Tregistry.create();
MyReg.RootKey := HKEY_LOCAL_MACHINE;
MyReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run',False);
MyReg.GetValueNames(listbox1.items);
MyReg.CloseKey;
end;
有谁知道怎么弄吗?
var
Myreg : TRegistry;
I: Integer;
ListItem: TListItem;
NewColumn: TListColumn;
s_items : TStrings;
begin
s_items := TStringList.create;
MyReg := Tregistry.create();
MyReg.RootKey := HKEY_LOCAL_MACHINE;
MyReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run',False);
MyReg.GetValueNames(s_items);
MyReg.CloseKey; with ListView1 do
begin
for I := 0 to s_items.Count - 1 do
begin
ListItem := Items.Add;
Listitem.Caption := s_items[i];
ListItem.ImageIndex := I;
end;
NewColumn := Columns.Add;
NewColumn.Caption := 'Column 1';
NewColumn := Columns.Add;
NewColumn.Caption := 'Column 2';
end;end;
var
Myreg : TRegistry;
i:integer;
begin
MyReg := Tregistry.create();
MyReg.RootKey := HKEY_LOCAL_MACHINE;
MyReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run',False);
MyReg.GetValueNames(listbox1.items);
for i:=0 to listbox1.Items.Count-1 do
TreeView1.Items.Add(nil,ListBox1.Items.Strings[i]);
MyReg.CloseKey;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Myreg : TRegistry;
I: Integer;
ListItem: TListItem;
NewColumn: TListColumn;
s_items : TStrings;
temp:String;
begin
s_items := TStringList.create;
MyReg := Tregistry.create();
MyReg.RootKey := HKEY_LOCAL_MACHINE;
MyReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run',False);
MyReg.GetValueNames(s_items);
MyReg.CloseKey;
with ListView1 do
begin
ViewStyle := vsReport;
for I := 0 to s_items.Count - 1 do
begin
ListItem := Items.Add;
Listitem.Caption := s_items[i];
MyReg := Tregistry.create();
MyReg.RootKey := HKEY_LOCAL_MACHINE;
MyReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run',False);
temp:=MyReg.ReadString(s_items[i]);
MyReg.CloseKey;
ListItem.SubItems.Add(temp);
ListItem.ImageIndex := I;
end;
NewColumn := Columns.Add;
NewColumn.Caption := 'Column 1';
NewColumn := Columns.Add;
NewColumn.Caption := 'Column 2';
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Myreg : TRegistry;
I: Integer;
ListItem: TListItem;
NewColumn: TListColumn;
s_items : TStrings;
temp:array of String;
begin
s_items := TStringList.create;
MyReg := Tregistry.create();
MyReg.RootKey := HKEY_LOCAL_MACHINE;
MyReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run',False);
MyReg.GetValueNames(s_items);
SetLength(temp,s_items.Count);
for I:=0 to s_items.Count-1 do
temp[I]:=MyReg.ReadString(s_items[I]);
MyReg.CloseKey;
with ListView1 do
begin
ViewStyle := vsReport;
for I := 0 to s_items.Count - 1 do
begin
ListItem := Items.Add;
Listitem.Caption := s_items[I];
ListItem.SubItems.Add(temp[I]);
ListItem.ImageIndex := I;
end;
NewColumn := Columns.Add;
NewColumn.Caption := 'Column 1';
NewColumn := Columns.Add;
NewColumn.Caption := 'Column 2';
end;
end;