可以写ini文件,然后改名成*.dll文件,放在系统目录里,
每次启动都从里面取时间

解决方案 »

  1.   

    我学得用加密的方法,写注册表或ini文件都可以。
      

  2.   

    用时间做为制约条件.写入一个全局的GUID中.
      

  3.   

    写一个密文文件放在Windows目录下。
      

  4.   

    用INI文件实现,它存储第一次使用的时间。每次启动都读取系统时间,然后和第一次使用的时间比较
      

  5.   

    试试 Exe 文件中的空当
    试试 Exe 文件中的空当
    试试 Exe 文件中的空当
    试试 Exe 文件中的空当
    试试 Exe 文件中的空当
      

  6.   

    做个本地表 用CLIENTDATASET 连。
    在表中记录登录的时间等。
      

  7.   

    送你一个:)
    unit regApp;interfaceuses Windows,SysUtils,Registry,forms, Dialogs;type
      Tlogin = class
      private
        //
      public
        constructor Create; virtual;
        procedure CheckLogin;
      end;
    implementationconstructor Tlogin.Create;
    begin
      inherited Create;
    end;procedure Tlogin.CheckLogin;
    var
      Reg_id: TDateTime;
      RegisterTemp: TRegistry;
      InputStr, Get_id: string;
      Reg_tag, ClickDok: Boolean;
      Allow: Integer;
    begin
      Allow := 30; //试用期为30天
      Reg_tag := False; //软件是否到注册期
      registerTemp := TRegistry.Create; //准备使用注册表
      with registerTemp do
      begin
        RootKey := HKEY_LOCAL_MACHINE; //存放
        if OpenKey('Software\Microsoft\Windows\CurrentSowft\tag', True) then // 建一目录,存放标志值
        begin
          if ValueExists('DateTag') then begin //用DateTag的值作为标志
            Reg_id := ReadDate('DateTag'); //读出标志值
            if (Reg_id <> 0) and (Now - Reg_id > Allow) then //允许使用的时间到
              Reg_tag := True;
          end
          else
            WriteDateTime('DateTag', Now); //建立标志,并置初始标志值。
        end;
        if Reg_tag then begin //要求用户输入注册码
          ClickDok := InputQuery('您使用的是非注册软件,请输入注册码:', ' ', inputstr);
          if ClickDok then begin
            Get_id := IntToStr(1102); //注册码2
            if Get_id = InputStr then begin
              WriteDateTime('DateTag', 0); //将标志值置为0,即已注册。
              CloseKey;
              Free;
            end
            else begin //若输入的注册码错误
              Application.MessageBox('注册码错误!请与作者联系!', '警告框', mb_ok);
              CloseKey;
              Free;
              Application.Terminate;
            end;
          end
          else begin //若用户不输入注册码
            Application.MessageBox('请与作者联系,使用注册软件!', '警告框', mb_ok);
            CloseKey;
            Free;
            Application.Terminate;
          end;
        end;
      end;
    end;end.
      

  8.   

    程序第一次运行时将日期转化为数字,然后用算法将此数字加密,再把它加入到.res文件中。15天之后将.res文件删除。