| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 916 人关注过本帖
标题:这个错误怎么解决
只看楼主 加入收藏
空前
Rank: 1
等 级:新手上路
帖 子:1146
专家分:0
注 册:2004-5-11
收藏
 问题点数:0 回复次数:3 
这个错误怎么解决
cannot focus a disabled or invisible window
搜索更多相关主题的帖子: cannot disabled invisible window 
2004-11-25 00:10
空前
Rank: 1
等 级:新手上路
帖 子:1146
专家分:0
注 册:2004-5-11
收藏
得分:0 

注册窗体代码:

unit Unit2;

interface

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

type TForm2 = class(TForm) Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; Label1: TLabel; Label2: TLabel; Label3: TLabel; Button1: TButton; Button2: TButton; Table1: TTable; procedure Button1Click(Sender: TObject); procedure FormShow(Sender: TObject); private { Private declarations } public { Public declarations } end;

var Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject); begin table1.Open ; table1.SetKey ; table1.FieldByName('name').AsString :=edit1.Text ;

if not table1.GotoKey then begin if edit2.Text = edit3.Text then begin table1.Open ; table1.InsertRecord([edit1.Text ,edit2.Text ]); showmessage('注册成功'); table1.Close ; self.close; end else showmessage('两次输入密码不一致'); end else showmessage('用户名存在'); edit1.Clear ; edit2.Clear ; edit3.Clear ; edit1.SetFocus ;

end;

procedure TForm2.FormShow(Sender: TObject); begin edit1.Clear ; edit2.Clear ; edit3.Clear ; edit1.SetFocus ; end;

end.

点击那个按钮后,弹出对话框,就出现了上面的那个错误.


2004-11-25 00:13
海风
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2005-3-4
收藏
得分:0 
不..

学者...不耻下问...
2005-03-04 11:37
2352791
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2005-3-15
收藏
得分:0 
不知道!
2005-03-15 14:59
快速回复:这个错误怎么解决
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020446 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved