Simple proof of concept here, let's say I create an empty form with just one button:
Code: Select all
$form1_Load={
}
$button1_Click={
do
{
[System.Windows.Forms.Application]::DoEvents()
Start-Sleep -m 200
}
while (!$x)
}
That loop runs indefinitly and since i'm calling DoEvents at every iteration, the form stays responsive and i'm able to do anything with it.
Why then, when i MINIMIZE that form (using the _ button) , it can't be shown again? As if it's in a frozen minimized state?
I tried with refresh added in but still no luck, once it's minimized, there's no way to get it to show back up by clicking it's icon in the taskbar. What's going on?
Code: Select all
$button1_Click={
do
{
$form1.Refresh()
[System.Windows.Forms.Application]::DoEvents()
Start-Sleep -m 200
}
while (!$x)
}