jvierra wrote:It is not really possible to understand what you are trying to ask.
Sorry about that, I will try to make myself more clear
I have to forms.
A main form where I have a button. When I press that button, it makes the progressbar visible in the main form and opens a sub form.
What I would like is to set the progressbar.visible, in the main form, to false as soon as the sub form is loaded.
But with the following code, it is set to false when I close the sub form, and not when is it finished loading.
Here is the code for the button in the main form.
PowerShell Code
Double-click the code block to select all.
$button_NewCompanyOU_Click = {
#TODO: Place custom script here
$toolstripprogressbar1.Visible = $true
$toolstripprogressbar1.Value = 1
$toolstripprogressbar1.Maximum = 2
if (Call-NewCompanyOU_psf –eq "OK")
{
$toolstripprogressbar1.PerformStep()
$toolstripprogressbar1.Visible = $false
}
}
Hope i make more sense now