第一个问题:
begin
if MessageDlg('密码不正确,请重新输入',mtConfirmation, [mbYes, mbNo],0)=mrYes
then
begin
edit1.Clear;
edit1.SetFocus;
end
else
close;
end;
问:请问edit1.SetFocus;这个语句是什么意思啊??谢谢了第二个问题:
// 当用户名与密码正确并且输入次数少于三次时就登录成功
if locate('用户名',username,[lopartialkey]) and locate('密码',password,[lopartialkey]) and (itimes<4) then...
问:请问lopartialkey是啥意思???谢谢了
begin
if MessageDlg('密码不正确,请重新输入',mtConfirmation, [mbYes, mbNo],0)=mrYes
then
begin
edit1.Clear;
edit1.SetFocus;
end
else
close;
end;
问:请问edit1.SetFocus;这个语句是什么意思啊??谢谢了第二个问题:
// 当用户名与密码正确并且输入次数少于三次时就登录成功
if locate('用户名',username,[lopartialkey]) and locate('密码',password,[lopartialkey]) and (itimes<4) then...
问:请问lopartialkey是啥意思???谢谢了
lopartialkey是‘包含’,类似SQL语句中的LIKE。
edit1.SetFocus; 是把焦点移动edit1,就是光标定位edit1编辑框2、
lopartialkey是表示查找时可以部分匹配这些可以自已查DELPHI的帮助,里面写得很清楚了
Hard work you'll be a good programer.
edit1.SetFocus; 是把焦点移动edit1,就是光标定位edit1编辑框2、
lopartialkey是表示查找时可以部分匹配这些可以自已查DELPHI的帮助,里面写得很清楚了
TLocateOption = (loCaseInsensitive, loPartialKey);
TLocateOptions = setof TLocateOption;DescriptionTLocateOptions is the type of the Options parameter to a dataset’s Locate method. The following table lists the possible values:Value DescriptionloCaseInsensitive Key fields and key values are matched without regard to case.
loPartialKey Key values can include only part of the matching key field value; for example, 'HAM' would match both 'HAMM' and 'HAMMER.'loCaseInsensitive全部匹配
loPartialKey部分匹配