过年了,还有两个问题没有解决,有劳了!在线等候!
问题1:
怎么把 mianmenu1 的所有菜单的 visable 都设为 false呢?
如附件的 :把所有菜单 的 visable 都设为 false呢(包括 子菜单)
问题2:
是登录窗体的问题.
在 project 里:
var
login:word;
begin
Application.Initialize;
form31:=tform31.create(nil);
form31.show;
form31.Refresh;
Application.CreateForm(TForm1, Form1);
sleep(2000);
form31.Free;
form32:=tform32.Create(nil);
try
login:=form32.ShowModal;
finally
form32.Free;
end;
if login=mrcancel then
begin
form1.Free;
application.Terminate;
end ;
if login=mrok then
application.Run;
//Application.Run;
end.
在 登录窗体form32
var
Form32: TForm32;
hdd:integer;
implementation
uses
unit1;
{$R *.dfm}
procedure TForm32.BitBtn1Click(Sender: TObject);
var
password1:string;//密码
adostoredproccheckmima:tadostoredproc;
begin
adostoredproccheckmima:=tadostoredproc.Create(nil);
adostoredproccheckmima.Connection:=form1.ADOConnection1;
adostoredproccheckmima.Close;
adostoredproccheckmima.ProcedureName:='procselect_employyeezhanghaotable_on_employyeezhanghao';
adostoredproccheckmima.Parameters.Refresh;
adostoredproccheckmima.Parameters.ParamByName('@employyeezhanghao').Value:=trimleft(edit1.Text);
adostoredproccheckmima.Open;
password1:=adostoredproccheckmima.Fieldbyname('employyeemima').AsString;
if password1=trimleft(edit2.Text) then
begin
showmessage('登陆成功');
form32.ModalResult:=mrok ;
end
else
begin
showmessage('您的密码错误');
hdd:=hdd+1;
if hdd=3 then
begin
showmessage('对不起,您必须退出本次登陆');
form32.ModalResult:=mrcancel;
end;
end;
adostoredproccheckmima.Free;
end;
procedure TForm32.BitBtn2Click(Sender: TObject);
begin
form32.ModalResult:=mrcancel;
end;
现在的问题是:我就是密码不对,也出现 主窗体 form1 啊
我真的不知道怎么做了,请老大给我调式一下.
谢谢,新年快乐!