zoukankan      html  css  js  c++  java
  • Delphi回车键切换焦点

    unit Unit1;
     
    interface
     
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, ExtCtrls, StdCtrls;
     
    type
      TForm1 = class(TForm)
        Panel1: TPanel;
        Label1: TLabel;
        Edit1: TEdit;
        Label2: TLabel;
        Edit2: TEdit;
        Label3: TLabel;
        Edit3: TEdit;
        Label4: TLabel;
        Edit4: TEdit;
        Label5: TLabel;
        Edit5: TEdit;
        Label6: TLabel;
        Edit6: TEdit;
        Button1: TButton;
        Button2: TButton;
        procedure Edit1KeyDown(Sender: TObject; var Key: Word;
          Shift: TShiftState);
        procedure Button2Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
     
    var
      Form1: TForm1;
     
    implementation
     
    {$R *.dfm}
     
    procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    begin
      if Key = vk_Return then
        FindNextControl(ActiveControl,True,False,False).SetFocus;
    end;
     
    procedure TForm1.Button2Click(Sender: TObject);
    begin
      Close;
    end;
     
    end.
  • 相关阅读:
    各种有趣言论收集
    人类未来进化方向恶考
    mysql 列所有表行数
    恩,有那么一个人
    00后厉害哇
    。。。。
    放弃微博,继续回来写月经
    嘿,大家还好吗
    git
    require js
  • 原文地址:https://www.cnblogs.com/jijm123/p/10826982.html
Copyright © 2011-2022 走看看