📄 options.pas
字号:
unit Options;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, DSPack, DSUtil, DirectShow9, CheckLst;
type
TOptionForm = class(TForm)
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Button1: TButton;
Button2: TButton;
ListBox1: TListBox;
ListBox2: TListBox;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure GetInputIndex(var a, b: Integer);
end;
var
OptionForm: TOptionForm;
SysDev1: TSysDevEnum;
SysDev2: TSysDevEnum;
ai: Integer;
bi: Integer;
implementation
{$R *.dfm}
procedure TOptionForm.GetInputIndex(var a, b: Integer);
begin
a := ai;
b := bi;
end;
procedure TOptionForm.FormCreate(Sender: TObject);
var
i: Integer;
begin
ListBox1.Clear;
SysDev1 := TSysDevEnum.Create(CLSID_VideoInputDeviceCategory);
for i := 0 to SysDev1.CountFilters - 1 do
begin
ListBox1.AddItem(SysDev1.Filters[i].FriendlyName, nil);
end;
ListBox1.ItemIndex := 0;
ListBox2.Clear;
SysDev2 := TSysDevEnum.Create(CLSID_AudioInputDeviceCategory);
for i := 0 to SysDev2.CountFilters - 1 do
begin
ListBox2.AddItem(SysDev2.Filters[i].FriendlyName, nil);
end;
ListBox2.ItemIndex := 0;
end;
procedure TOptionForm.Button1Click(Sender: TObject);
begin
ai := ListBox1.ItemIndex;
bi := ListBox2.ItemIndex;
Close;
end;
procedure TOptionForm.Button2Click(Sender: TObject);
begin
ai := 0;
bi := 0;
Close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -