我今天测试昨天编的程序时系统提示出现了个对话框,上面写着:
"cannot focus a disabled or invisible window."
意思好想是少了个焦点,可我昨天测试还没事啊,今天上来就加了个showmessage(),就不行了,可我把他删了,还不行。有高亮度的框停留在我
program Project1的 Form2:=TForm2.Create(Application);上,可我没动form2啊?
请高手帮忙!!!!!!!!!1
谢谢
"cannot focus a disabled or invisible window."
意思好想是少了个焦点,可我昨天测试还没事啊,今天上来就加了个showmessage(),就不行了,可我把他删了,还不行。有高亮度的框停留在我
program Project1的 Form2:=TForm2.Create(Application);上,可我没动form2啊?
请高手帮忙!!!!!!!!!1
谢谢
解决方案 »
- 编程实现RRAS断开VPN客户端的连接
- AssignPRN和Writeln打印如何设置字体
- file not found"FR_Desgn.dcu"该怎么处理?
- 小弟有几个问题要请请教大家,请VCL高手帮忙!!!!
- 初用Delphi,问个弱弱的问题
- 如何获取internet中的IP地址?
- Ttable 中有质宽,料厚两列,和规格列,如何用前两列合并出规格列
- 启耀OLAP,为商业智能提供澎湃动力
- 各位兄弟,在線等候....
- 为什么用form winzard 做的窗口在程序一启动就打开,虽然...
- 我已经编过几个程序了,但感觉技术还不够,请问要进一步提高应该怎么做?
- 这样的SQL应该怎么写,关于删除的
unit Unit2;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, DBTables, StdCtrls, Buttons;type
TForm2 = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Label3: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Database1: TDatabase;
Table1: TTable;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
FResult: Boolean;
public
{ Public declarations }
property Result: Boolean read FResult;
end;var
Form2: TForm2;implementation{$R *.dfm}procedure TForm2.BitBtn1Click(Sender: TObject);
var
logname, password: string;
begin
logname := Edit1.Text;
password := Edit2.Text;
Table1.Open;
while not Table1.Eof do
begin
if (logname = Table1.Fields[0].AsString) and (password = Table1.Fields[1].AsString) then
FResult := True;
Table1.Next;
end;
if FResult then
begin
Close;
end
else
begin
if (Edit1.Text = '') or (Edit2.Text = '') then
ShowMessage('请您将两项输入完整!')
else ShowMessage('输入错误,请重输!!');
Edit1.Clear;
Edit2.Clear;
Table1.Close;
Edit1.SetFocus;
end;
end;
end.