Delphi7代码求解释

if not DM_Public.LOGIN_DB(UpperCase(Trim(edGC.TransSTR)), UpperCase(Trim(edGC.Text)),
UpperCase(Trim(User.Text)), UpperCase(Trim(edPassword.Text)), ComboBox1) then Application.Terminate;

if SUSER <> 'USERID' then//比较两个字符串,如果不相等就向下执行
begin
if not GetLoginView() then //一个返回布尔值的函数,如果他为假的话
Application.Terminate;//整个程序什么也不干,退出
end;

procedure TFrmPassword.Panel2DblClick(Sender: TObject)//登录窗口上的面板组件上双击鼠标
begin//
ComboBox1.Visible := (User.Text = 'NTCT') and not ComboBox1.Visible;
ComboBox1是否显示,由(User.Text = 'NTCT') 字符串比较和not ComboBox1.Visible;两个条件决定;下面一句也是一个意思
Label_DB.Visible := (User.Text = 'NTCT') and not Label_DB.Visible;
其实也可以这样写
if not Label_DB.Visible then //也就是说如果这个标签现在没有显示的话就执行下面这半句
Label_DB.Visible := (User.Text = 'NTCT') ;
end;

这孩子倒是一个想学的孩子,不象哪些给一个邮箱,要发代码的孩子.
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-06-06
LOGIN_DB是检测是否合法登录的函数,TRUE表示允许登录
前面NOT 表示不允许登录的时候执行Application.Terminate;退出系统追问

if SUSER 'USERID' then begin
if not GetLoginView() then Application.Terminate;
end;

procedure TFrmPassword.Panel2DblClick(Sender: TObject);
begin
ComboBox1.Visible := (User.Text = 'NTCT') and not ComboBox1.Visible;
Label_DB.Visible := (User.Text = 'NTCT') and not Label_DB.Visible;/
end;

这两段又分别是什么意思啊

相似回答