I’m still learning PowerShell but have built a Windows Form that has a ticker that every ten seconds invokes a remote computer to run some PowerShell code to do a few checks and return various statuses that are then displayed on the form.
All easy an standard stuff.
I have a couple of buttons on my form that do other things and I’m noticing that when the code in the Add_Tick part of the Timer that invokes a command on the remote computer is running and I click on one of my Buttons on my form at the same time the Button code does not execute until the code in the Timer has completed.
This gives the appearance of a delay or unresponsiveness.
How can I combat this?
Can I have the code in my Tick of the Timer invoking PowerShell commands on my remote computer but have my Button presses execute at the same time?
The goal is to display certain statuses from a remote computer every ten seconds in my form but have the Buttons a bit more responsive than they are when you click on the Button at the same time the Tick part of the Timer is executing its code.
Are there any suggestions on how to solve this?
submitted by /u/dontknowwheretogo1
[link] [comments]
The post Forms with Ticker and Button Click at the same time? appeared first on How to Code .NET.