Powershell绘图闪烁

# Powershell
Add-Type -AssemblyName System.Windows.Forms

$PowerShellForms = New-Object System.Windows.Forms.Form
$PowerShellForms.ClientSize = New-Object System.Drawing.Size(1000, 800)
$PowerShellForms.MaximumSize = $PowerShellForms.MinimumSize = $PowerShellForms.Size
$PowerShellForms.MaximizeBox = $false

$e = $PowerShellForms.CreateGraphics()
$script:n = 0
$script:font = New-Object System.Drawing.Font('微软雅黑', 150)

$PowerShellForms.Add_Paint([System.Windows.Forms.PaintEventHandler]{
    $brush = New-Object System.Drawing.SolidBrush([System.Drawing.Color]::FromArgb(119, 222, 255))
    if ($script:n -le 1000){
    $e.FillRectangle($brush, 0, 0, $script:n, 500)
    $script:n += 1
    $e.DrawString([system.string]($script:n) + '‰', $script:font, $brush, 10, 510)}
    else {$e.DrawString('End.', $script:font, $brush, 10, 10)}
    $PowerShellForms.Invalidate()
})

$PowerShellForms.ShowDialog()

我想实现:制作一个进度条,等进度条完成后显示“End.”,没完成时在进度条下方显示千分数。但是却发生了闪烁。怎样才能去除闪烁?