第一个问题:
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是啥意思???谢谢了

解决方案 »

  1.   

    SetFocus是使控件获得焦点
    lopartialkey是‘包含’,类似SQL语句中的LIKE。
      

  2.   

    edit1.SetFocus //光标聚焦在edit1中
      

  3.   

    1、
    edit1.SetFocus; 是把焦点移动edit1,就是光标定位edit1编辑框2、
    lopartialkey是表示查找时可以部分匹配这些可以自已查DELPHI的帮助,里面写得很清楚了
      

  4.   

    edit1获得输入焦点loPartialKey Key values can include only part of the matching key field value; for example, 'HAM' would match both 'HAMM' and 'HAMMER.'多看看帮助文档。很有用的
    Hard work you'll be a good programer.
      

  5.   

    1、
    edit1.SetFocus; 是把焦点移动edit1,就是光标定位edit1编辑框2、
    lopartialkey是表示查找时可以部分匹配这些可以自已查DELPHI的帮助,里面写得很清楚了
      

  6.   

    TLocateOptions defines the values for the Options parameter of the Locate method of a dataset.UnitDBtype
      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部分匹配