“怎样把密码框等...做成动态连接库 *.dll 方式?”。
至少有两种方法可以做到:
1。可以单独做成DLL。(麻烦);
2。做成COM组件(简单)。我手边没有Delphi。记不清一些具体名称了。下面的步骤你参考一下,也许一些地方的名称写的不对,自己跟Delphi的相关菜单
对一下号就可以了:)
一。New_>Active Library->COM.确定后输入新的类名,所有可选项默认不动;
二。将你的密码框窗体Uses进来。
三。在COM组件的类型文件里声明一个接口,在该接口下声明一个方法。该方法的功能是Show出你的密码框窗体。
四。选Run_>Register the ActiveX的方式来编译该COM组件。
  经过上述步骤,你会发现在你的当前目录下会产生一个*.dll文件。同时还有一个*TLB.Pas文件。在以后要用到该密码框的时候将该*TLB.Pas文件Use到你的窗体单元里直接调用你前面声明的那个接口中的方法,你就可以看到你的密码框了。

解决方案 »

  1.   

    我是个初学者能在说的详细一些么?
    我还是不能生成  .DLL文件?能在详细点告诉我么?谢谢!
      

  2.   

    library Project1;{ Important note about DLL memory management: ShareMem must be the
      first unit in your library's USES clause AND your project's (select
      Project-View Source) USES clause if your DLL exports any procedures or
      functions that pass strings as parameters or function results. This
      applies to all strings passed to and from your DLL--even those that
      are nested in records and classes. ShareMem is the interface unit to
      the BORLNDMM.DLL shared memory manager, which must be deployed along
      with your DLL. To avoid using BORLNDMM.DLL, pass string information
      using PChar or ShortString parameters. }uses
      SysUtils,
      Classes;{$R *.res}begin
    end.