Remember xepra, every form in delphi has his own unit. At least the visual forms.
If you have data, procedures etc which has to be available in different forms you have to declare it in a separate unit.
Example: You have an input form for two variables, and a result form where you do some processing with these variables.
To make the variables available for both forms you have to put them in a non visible (normal) unit:
New --> Unit
Below interface type the data types, variables and procedures which must be available for other forms or units
Below implementation define your procedures and functions
ex:
unit BasicData;
interface
Type
DataRecord = Record
Level : byte;
FileName : string[80];
HelpString : string[20];
end;
Var
Searcher, Actualrecord : DataRecord;
DataFile : File of DataRecord;
FileDir : string;
Procedure OpenIndexList_ForUpdate;
Procedure AtFirstRecord;
Procedure AtLastRecord;
Procedure AtNextRecord;
Procedure AtPreviousRecord;
Procedure AppendRecord(x : DataRecord);
Procedure Updaterecord(x : dataRecord);
Implementation
uses SysUtils;
Procedure OpenIndexList_ForUpdate;
begin
FileDir :='';
AssignFile (Datafile, FileDir + 'List.dta');
{$I-}
Reset(Datafile);
{$I+}
if IOresult <> 0 then Rewrite(DataFile);
end;
etc....
end.
In above example If defined my global data and procedures, and I make them available for other units with the command:
File ---> Use Unit
Hope this is what you are looking for S. van Els
SAvanEls@cq-link.sr