unit Globals;
interface
var
GlobalFontSize: Integer = 10;
implementation
end.
-----------------------------
unit Unit1;
...
implementation
uses
Unit2, Globals; // Use the implementation "uses" whenever possible.
procedure TForm1.Combobox1Change(Sender: TObject);
begin
if Combobox1.ItemIndex > -1 then
// Store selected font size in global variable
GlobalFontSize := StrToInt(Combobox1.Items[Combobox1.ItemIndex]);
end;
------------------------------
unit Unit2;
...
implementation
uses
Globals;
procedure TForm2.UpdateFontSize;
begin
// do something with GlobalFontSize
// Read the font size from the global variable rather than from Form1's combobox.
end;