Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to pass parameters?

Status
Not open for further replies.

shanzen

Programmer
Apr 1, 2001
9
GB
Hi there,

Can anyone help me on how to pass a parameter from one form to another?

say i want to pass paramA in Form A to form B's setparamB procedure, where the paramA passed will initialise the form B's global variable, paramB.

Please aid. Thank you for your kind attention.
 
hi,
You can do like the following..

In FormA
~~~~~~~~~

Application.CreateForm(TFORMB,FORMB)
FORMB.SetParamB(ParamA) ;
{SETPARAMB method Must be a Public}
FORMB.ShowModal;
FORMB.Free;

In FormB
~~~~~~~~~

procedure TFORMB.SetParamB(Param : string);
begin
ParamB := Param;
end;

This code will do for you.


Regards
Pradeep.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top