📄 unit2.pas.~5~
字号:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons,Registry;
type
TForm2 = class(TForm)
GroupBox1: TGroupBox;
ListBox1: TListBox;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.FormShow(Sender: TObject);
var rg_List:TRegistry;ts_OdbcList:TStrings;
begin
rg_List:=TRegistry.Create;
ts_OdbcList:=TStringList.Create;
ListBox1.Clear;
rg_List.RootKey:=HKEY_CURRENT_USER;
rg_List.OpenKey('Software\ODBC\ODBC.INI',false);
rg_List.GetKeyNames(ts_OdbcList);
ListBox1.Items.AddStrings(ts_OdbcList);
rg_List.CloseKey;
rg_List.Free;
ts_OdbcList.Free;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -