请各位指教,请写详细写。

解决方案 »

  1.   

    begin
      //限制用户使用时间。例:20秒
      RunDateTime := now;
      Form1.Caption := DateTimeToStr(now) + FloatToStr(RunDateTime - StartDateTime);
      if (RunDateTime - StartDateTime) > 20.0 / (60 * 60 * 24){50.0 / (60 * 24) 50分钟} then
      begin
        Timer1.Enabled := false;
        showmessage('time is over');
      end  StartDateTime := now;//得到起始时间
    //*******************************************************************//
      //设置截止时间
      DateSeparator := '-';
      ShortDateFormat := 'yyyy/mm/dd';
      NowDate := Date;
      EndDate := StrToDate('2001-08-07');
      if NowDate > EndDate then
        showmessage('date is over')
      

  2.   

    上一个是用户只能使用多长时间,下一个是用户只能用到什么日期,次数跟着个差不多,只是要进行存储一下,放到注册表中活着ini文件中就可以了
      

  3.   

    写一个INI文件,每打开一次应用程序,在INI文件中记录一次,比较一个限定值,就可以了,
    日期同理。
    方法很多,这个最简单
      

  4.   

    procedure TFlogOn.btnLoginClick(Sender: TObject);
    begin
      if edtID.Text='' then
      begin
        Application.MessageBox('请输入用户ID','提示',MB_Ok+MB_IconInformation);
        edtID.SetFocus;
        edtPassWord.Text:='';
        exit;
      end;
      if CanLogOn(edtID.Text,edtPassword.Text,mainform.conn) then
          begin
          ModalResult:=mryes
          end
      else begin
               LogNumber:=LogNumber+1;
               if LogNumber=3 then
               begin
                   Application.MessageBox('对不起,你已经3次登陆失败,退出系统','提示',MB_Ok+MB_IconInformation);
                   Application.Terminate;
               end;
               Application.MessageBox('用户不存在或密码错误.','提示',MB_Ok+MB_IconInformation);
               edtID.SelectAll;
               edtID.SetFocus;
               edtPassWord.Text:='';
            end;end;
      

  5.   

    最好放到注册表随便一个地方中,字段值还要加密。
    呵呵。放到INI,保密行差,啊
      

  6.   

    在windows等系统目录生成一个文件用来存放打开次数、打开时间长度等信息,可以为文本文件、二进制文件等,文件名可以取为.dll;.exe等用来迷惑人。具体的实现方法有太多,请自行参考!