⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unitfrmmain.pas

📁 《Delphi百例》源码?禗elphi百例》源码
💻 PAS
字号:
unit unitFrmMain;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

type
  TForm1 = class(TForm)
    procedure FormKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
  keytp: string;
implementation
{$R *.DFM}
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  //是否按下ALT键,只接收字符
  if (shift = [ssALT]) and (key >= $41) and (key <= $5A) then
    begin
      keytp := keytp + chr(key);
      if keytp = 'ABC' then
        begin
          showmessage(' WELLCOME');
        end;
    end;
end;
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -