diff --git a/MainForm.ps1 b/MainForm.ps1 index db11a3b..aba6ce2 100644 --- a/MainForm.ps1 +++ b/MainForm.ps1 @@ -12,6 +12,9 @@ $form = New-Object System.Windows.Forms.Form $form.Text = "SharePoint XLS Converter" $form.Size = New-Object System.Drawing.Size(600,500) +# Set AutoScaleMode to Dpi +$form.AutoScaleMode = [System.Windows.Forms.AutoScaleMode]::Dpi + # Add controls $lblConfig = New-Object System.Windows.Forms.Label $lblConfig.Text = "SharePoint Configuration:" @@ -67,6 +70,11 @@ $txtStatus.Location = New-Object System.Drawing.Point(20,210) $txtStatus.Size = New-Object System.Drawing.Size(540,240) $txtStatus.Multiline = $true $txtStatus.ScrollBars = "Vertical" +# Anchor the textbox to the form's edges +$txtStatus.Anchor = [System.Windows.Forms.AnchorStyles]::Top -bor ` + [System.Windows.Forms.AnchorStyles]::Bottom -bor ` + [System.Windows.Forms.AnchorStyles]::Left -bor ` + [System.Windows.Forms.AnchorStyles]::Right $form.Controls.Add($txtStatus) # Add Save Config button $btnSaveConfig = New-Object System.Windows.Forms.Button