faccountview.pas
来自「飘飘的传奇服务端院代码 能编译的 要控件 老大就让我传上去吧」· PAS 代码 · 共 53 行
PAS
53 行
unit FAccountView;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics,
Controls, Forms, Dialogs, StdCtrls;
type
TFrmAccountView = class(TForm)
EdFindID: TEdit;
EdFindIP: TEdit;
ListBox1: TListBox;
ListBox2: TListBox;
procedure EdFindIDKeyPress(Sender: TObject; var Key: Char);
procedure EdFindIPKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmAccountView: TFrmAccountView;
implementation
{$R *.DFM}
procedure TFrmAccountView.EdFindIDKeyPress(Sender: TObject; var Key: Char);
var
I: Integer;
begin
if Key <> #13 then exit;
for I := 0 to ListBox1.Items.Count - 1 do begin
if EdFindID.Text = ListBox1.Items.Strings[I] then
ListBox1.ItemIndex := I;
end;
end;
procedure TFrmAccountView.EdFindIPKeyPress(Sender: TObject; var Key: Char);
var
I: Integer;
begin
if Key <> #13 then exit;
for I := 0 to ListBox2.Items.Count - 1 do begin
if EdFindIP.Text = ListBox2.Items.Strings[I] then
ListBox2.ItemIndex := I;
end;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?