I am trying to overlap a System.Windows.Forms.Label to over another Label in a Powershell script.
Till now i have not found any working solution in- or outside Stackoverflow. Also the solution in this thread using transparancy does not work for me.
What i want to accomplish can be best demonstrated by the Powershell script below. A dot should be placed on top the 'Hi Mum!' label. Currenly the dot is partially overlayed by the 'Hi Mum!` label, though the dot has been brought to the front.
Add-Type -AssemblyName System.Windows.Forms
$FONT_WINGD = [System.Drawing.Font]::new("Microsoft Wingdings", 18)
$FONT_LARGE_BOLD = [System.Drawing.Font]::new("Microsoft Sans Serif", 18, [System.Drawing.FontStyle]::Bold)
$MyForm = New-Object System.Windows.Forms.Form
$MyForm.BackColor = [System.Drawing.Color]::FromArgb(200,20, 20)
$MyLabel = New-Object system.Windows.Forms.Label
$MyLabel.Text = "HI Mum !"
$MyLabel.Font = $FONT_LARGE_BOLD
$MyLabel.width = 150
$MyLabel.height = 24
$MyLabel.location = New-Object System.Drawing.Point(40,20)
#$MyLabel.BackColor = [System.Drawing.Color]::FromName("Transparent")
$MyLabel.BackColor = [System.Drawing.Color]::FromName("Green")
$MyLabel.SendToBack()
$Dot = New-Object system.Windows.Forms.Label
$Dot.text = [System.Char]::ConvertFromUtf32(0x25CF);
$Dot.ForeColor = [System.Drawing.Color]::FromArgb(155, 0, 79)
#$Dot.BackColor = [System.Drawing.Color]::FromName("Transparent")
$Dot.BackColor = [System.Drawing.Color]::FromName("Blue")
$Dot.width = 15
$Dot.height = 15
$Dot.location = New-Object System.Drawing.Point(56,4)
$Dot.Font = $FONT_WINGD
$Dot.BringToFront()
$MyForm.controls.AddRange(@($MyLabel,$Dot))
$MyForm.ShowDialog()

