过程是否可以不在类中声明,定义后可以在对象中调用(0分)

  • 主题发起人 主题发起人 shengge
  • 开始时间 开始时间
S

shengge

Unregistered / Unconfirmed
GUEST, unregistred user!
unit About;<br><br>interface<br><br>uses<br>&nbsp; Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br>&nbsp; StdCtrls, ExtCtrls, jpeg, StrUtils, CSTools, Math;<br><br>type<br>&nbsp; TAboutForm = class(TForm)<br>&nbsp; &nbsp; btnOK: TButton;<br>&nbsp; &nbsp; Bevel1: TBevel;<br>&nbsp; &nbsp; Label1: TLabel;<br>&nbsp; &nbsp; Label2: TLabel;<br>&nbsp; &nbsp; lbHome: TLabel; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>&nbsp; &nbsp; lbVer: TLabel;<br>&nbsp; &nbsp; lbHomeGTJA: TLabel;<br>&nbsp; &nbsp; lbLicInfo: TLabel;<br>&nbsp; &nbsp; imgCompany: TImage;<br>&nbsp; &nbsp; procedure lbHomeClick(Sender: TObject);<br>&nbsp; &nbsp; procedure FormCreate(Sender: TObject);<br>&nbsp; &nbsp; procedure lbHomeGTJAClick(Sender: TObject);<br>&nbsp; &nbsp; procedure FormShow(Sender: TObject);<br>&nbsp; &nbsp; procedure lbHomeMouseEnter(Sender: TObject);<br>&nbsp; &nbsp; procedure lbHomeMouseLeave(Sender: TObject);<br>&nbsp; private<br>&nbsp; public<br>&nbsp; &nbsp; ModalName: string;<br>&nbsp; &nbsp; LicInfo: string;<br>&nbsp; end;<br><br>&nbsp; procedure ShowAbout(const ModalName: string; const LicInfo: string = '');<br><br>var<br>&nbsp; AboutForm: TAboutForm;<br><br>implementation<br><br><br>其中的ShowAbout 过程是不是 不属于任何类,他可以被其他对象调用吗?
 
ShowAbout 确实不属于任何类,他可以被其他类调用
 
后退
顶部