Author Posts

July 5, 2017 at 11:35 am

I have a form created in Powershell 5 and when I click it it calls a function called getupdates. I have several other functions on the form that I would like to run once the getupdates function has completed i.e. when I click Start it runs getupdates then another function and when that has finished it runs another function etc. Any ideas how I can run multiple functions from one onclick event ? Do I need to put them in a scriptbocl and call that in the onclick event ? If so how do I do this?

$Buttonst = New-Object System.Windows.Forms.Button
$Buttonst.Location = New-Object System.Drawing.Size(400,100)
$Buttonst.Size = New-Object System.Drawing.Size(110,80)
$Buttonst.Text = "Start"

July 5, 2017 at 2:51 pm

You could call a Function which calls the others, I think that would be more organized.