Hi there,
Is there any way I can increase the text size of WelcomePrompt? It´s kinda small…
I already found out, how to increase the Timer Size.
Thanks,
Robert
Hi there,
Is there any way I can increase the text size of WelcomePrompt? It´s kinda small…
I already found out, how to increase the Timer Size.
Thanks,
Robert
In the “AppDeployToolkitMain.ps1” file, search for ‘## Form Welcome’. Add the following row to the form controls. Obviously you can choose your own font and size my sample:
$formWelcome.Font = New-Object System.Drawing.Font(“Segoe UI”,12.5,[System.Drawing.FontStyle]::Regular)
This is what mine looks like with changing the background color and font color:
## Form Welcome
$System_Drawing_Size = New-Object -TypeName ‘System.Drawing.Size’
$System_Drawing_Size.Height = 0
$System_Drawing_Size.Width = 0
$formWelcome.Size = $System_Drawing_Size
$formWelcome.Padding = $paddingNone
$formWelcome.Margin = $paddingNone
$formWelcome.DataBindings.DefaultDataSourceUpdateMode = 0
$formWelcome.Font = New-Object System.Drawing.Font(“Segoe UI”,12.5,[System.Drawing.FontStyle]::Regular)
$formWelcome.BackColor = “#4e4e4e”
$formWelcome.ForeColor = “WhiteSmoke”
$formWelcome.Name = ‘WelcomeForm’
$formWelcome.Text = $installTitle
$formWelcome.StartPosition = ‘CenterScreen’
$formWelcome.FormBorderStyle = ‘FixedDialog’
$formWelcome.MaximizeBox = $false
$formWelcome.MinimizeBox = $false
$formWelcome.TopMost = $TopMost
$formWelcome.TopLevel = $true
$formWelcome.Icon = New-Object -TypeName ‘System.Drawing.Icon’ -ArgumentList $AppDeployLogoIcon
$formWelcome.AutoSize = $true
$formWelcome.Controls.Add($pictureBanner)
$formWelcome.Controls.Add($flowLayoutPanel)
Ah, thank you very much!
Hey, I too want to do the same, but I do not see that section you mentioned on my AppDeployToolkitMain.ps1. Maybe it changed since then. Thanks
Is there a way to modify specific line of text in the Welcome section and make it bold? I’m referring specifically to this line in the AppDeployToolkitConfig.xml:
<WelcomePrompt_CustomMessage> </WelcomePrompt_CustomMessage>
What section would I have to update in AppDeployToolkitMain.ps1?
I already have this in place but it updates the entire welcome section text:
$labelAppName.Text = $labelAppNameText
$labelAppName.TextAlign = ‘TopCenter’
$labelAppName.Anchor = ‘Top’
$labelAppName.AutoSize = $true
$labelAppName.add_Click($handler_labelAppName_Click)
$labelAppName.Font = ‘Microsoft Sans Serif, 9pt, style=Bold’
Thanks!
Did you ever find a solution for this? Its exactly what I’m trying to do now.
Ok, I’ll give it a try.
In AppDeployToolkitMain.ps1 I look for WelcomePrompt_CustomMessage and I found where it reads the XML:
[string]$configWelcomePromptCustomMessage = $xmlUIMessages.WelcomePrompt_CustomMessage
Now I look for $configWelcomePromptCustomMessage
in the AppDeployToolkitMain.ps1
I find it in Function Show-WelcomePrompt
If ($CustomText -and $configWelcomePromptCustomMessage) {
$labelCustomMessage.Text = $configWelcomePromptCustomMessage
$flowLayoutPanel.Controls.Add($labelCustomMessage)
}
Now I look for $labelCustomMessage
and I find this:
## Label CustomMessage
$labelCustomMessage.DataBindings.DefaultDataSourceUpdateMode = 0
$labelCustomMessage.Name = 'labelCustomMessage'
$labelCustomMessage.Size = $defaultControlSize
$labelCustomMessage.MinimumSize = $defaultControlSize
$labelCustomMessage.MaximumSize = $defaultControlSize
$labelCustomMessage.Margin = New-Object -TypeName 'System.Windows.Forms.Padding' -ArgumentList 0,0,0,5
$labelCustomMessage.Padding = New-Object -TypeName 'System.Windows.Forms.Padding' -ArgumentList 10,0,10,0
$labelCustomMessage.TabStop = $false
$labelCustomMessage.Text = $configClosePromptMessage
$labelCustomMessage.TextAlign = 'MiddleCenter'
$labelCustomMessage.Anchor = 'Top'
$labelCustomMessage.AutoSize = $true
$labelCustomMessage.add_Click($handler_labelCustomMessage_Click)
Now you’d think the .Size
, .MinimumSize
or .MaximumSize
properties would be the key. Alas no. The $defaultControlSize
thing is for the Label box size, not the font size.
I found this line that defines this object as a Label in Windows.Forms lingo (XAML is the way to go today, BTW)
$labelCustomMessage = New-Object -TypeName 'System.Windows.Forms.Label'
I go in the internet to see what are the properties of label object in Windows.Forms
I find (c# - Easiest way to change font and font size - Stack Overflow]
YourLabel.Font = new Font("Arial", 24,FontStyle.Bold)
So our solution is something like:
$labelCustomMessage.Font = New-Object System.Drawing.Font(“Segoe UI”,12.5,[System.Drawing.FontStyle]::Regular)
Gee that looks familiar.
This is pretty much what I said years ago…