procedure TForm1.FormCreate(Sender: TObject);
var
sw, sh, ft, fl :Integer;
begin
// 1366x768 but account for title bar height
PageControl1.ActivePage := MapTab; // Put on first tab
Form1.Caption := 'WSPR Propagation Mapping - V'
+ VERSION + ' --- ' + OpenFileName;
// Set form to 1366x768 for laptop and centered on any larger screen
PixPerInch := Screen.PixelsPerInch; // Pitch for this PC
sh := Screen.Height; // Screen height
sw := Screen.Width; // Screen width
ft := ( sh - MINSCRH - TITLEHEIGHT) div 2; // Centered vertically
if ft < 0 then ft := 0; // Don't let it go neg
fl := ( sw - MINSCRW ) div 2; // Centered horizontally
if fl < 0 then fl := 0; // Don't let it go neg
Form1.Top := ft; // Set top
Form1.Left := fl; // Set left side
Form1.Height := MINSCRH - TITLEHEIGHT; // Set minimum height
Form1.Width := MINSCRW; // Set minimum width
Application.ProcessMessages; // Now do this
{// Start full screen on any PC
Form1.Top := 0; // Set top
Form1.Left := 0; // Set left side
Form1.Height := Screen.Height - TITLEHEIGHT; // Set to screen height
Form1.Width := Screen.Width; } // Set to screen width
// Intialize the time scale under map
InitWidth := TimeScaleImage.Width; // Initial width of image
TimeScaleImageInit();
TimeStart := 0;
TimeEnd := 24;
// Load CallGrid names in config tab and set sizes
CallGridStringGrid.Cells[0,0] := 'Call';
CallGridStringGrid.Cells[0,1] := 'Grid';
CallGridStringGrid.Cells[1,0] := TxCall; //MY_CALL;
CallGridStringGrid.Cells[1,1] := TxGrid; //MY_GRID;
CallGridStringGrid.Height := CallGridStringGrid.DefaultRowHeight
* CallGridStringGrid.RowCount
+ 4;
CallGridStringGrid.Width := CallGridStringGrid.ColCount
* CallGridStringGrid.DefaultColWidth
+ 4;
// Open users data, call, grid, TZ
ConfigOpen();
// Initialize the station data window
StationImageInit();
StationDataDraw();
TimeScaleDraw( 0, 24 );
end;