你说的是这个意思吗?你看看这段代码
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
type
Tmythread=class(TThread)
protected
procedure execute;override;
procedure xcdb;
end;
procedure mypro(var j:integer);
var
Form1: TForm1;
pram:integer;
implementation
{$R *.dfm}
procedure mypro(var j:integer);//你自定义的函数
begin
j:=j+60;
end;
procedure Tmythread.xcdb ;
begin
pram:=30;
mypro(pram);
form1.Edit1.Text :=inttostr(pram);//返回的参数pram
end;
procedure Tmythread.execute ;
begin
Synchronize(xcdb);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
mythread:Tmythread;
begin
mythread:=Tmythread.Create(false);
end;
end.