现有form1,form2窗口,form1为验证窗口,form2为验证后进入的窗口,现在问题是:在通过form1验证后,form1窗口可以消失,或者关闭,或者被取代,只要不显示就行了,只留一个form2就行了。请指教!
解决方案 »
- 求问用DELPHI编程,这种功能如何实现?
- 大家帮我看看这段测试代码,为什么老获取不到这个子窗口的句柄?
- 郁闷死了:在DELPHI环境中执行系统,打开窗口的时候,总是报错:an unknown error has occurred,可是不在DELPHI的环境下执行则没有这个错误是
- 挑战性的问题,请进
- 谁有CodeRush的使用资料(中文)!
- 怎么样用DbExpress下的控件?
- 为什么我不能用Google.com搜索本论坛的文章?
- 诚交深圳或广州的朋友--求版主别删
- 程序为何不能正常运行?见笑了。
- 谁知道能选择网上邻居的控件哪里有下载吗?
- 求助组合数算法!!!
- WinXp和WIN2000下应用程序字体显示问题?
Application.CreateForm(TF_main, F_main);
Application.CreateForm(TF_login, F_login);
f_login.ShowModal;//主要地方
Application.Run;验证地方
procedure TF_login.suiButton1Click(Sender: TObject);
var adologin:TADODataSet;
begin if (suiComboBox1.Text='') or (suiEdit1.Text='') then
begin
application.MessageBox('用户名或密码不能为空!,请查证!','提示',64);
exit
end;
adologin:=TADODataSet.Create(application);
adologin.ConnectionString:=' Provider=SQLOLEDB.1;'+'Persist Security Info=False;User ID='+GetRegInfo(3)+';Password='+GetRegInfo(4)+';'+
'Initial Catalog='+GetRegInfo(2)+';Data Source='+GetRegInfo(1);
adologin.CommandText:='select * from PassView where 用户名='''+trim(suiComboBox1.Text)+''''+' and '+'密码='+suiedit1.Text;
adologin.Open;
if adologin.RecordCount<>0 then
begin
username:=adologin.FieldValues['用户名'];
power:=adologin.FieldValues['权限']; adologin.Free;
f_main.show;
f_login.Hide;
end else//密码错误处理
begin
adologin.Free;
application.MessageBox('用户名和密码有误!请查证后再输!','提示',64);
suiedit1.Text:='';
exit;
end;//end else
end;
我还没有试,不知道行不行,初学!