unit8.~pas

来自「1.学生成绩管理系统的设计与实现 要求有以下文档: (1)概要设计(电子」· ~PAS 代码 · 共 50 行

~PAS
50
字号
unit Unit8;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, StdCtrls;

type
  TForm8 = class(TForm)
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Edit1: TEdit;
    SpeedButton1: TSpeedButton;
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form8: TForm8;

implementation
uses unit7;

{$R *.dfm}

procedure TForm8.SpeedButton1Click(Sender: TObject);
begin
form7.PageControl1.ActivePage:=form7.tabsheet2;
if  edit1.Text='' then
   begin
   MessageBox(handle,'请输入姓名,不能为空!','提示',MB_OK or MB_ICONINFORMATION);
   exit;
   end
else
   begin
   form7.adoquery1.SQL.Clear;
   form7.adoquery1.Close;
   form7.adoquery1.sql.Add('select *from 用户表 where 用户名='''+Edit1.Text+'''');
   MessageBox(handle,'查询完毕!','提示',MB_OK or MB_ICONINFORMATION);
   form7.adoquery1.Open;
   edit1.Text:='';
   end;
end;

end.

⌨️ 快捷键说明

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