Function based form updates not executing sequentially
Posted: Thu Jul 30, 2015 6:14 pm
I have a form that takes a hostname as input then;
1) When user clicks check status, a function is called to check if the pc exists in AD.
2) If it does it grabs info from AD and updates relevant textboxes on form.
3) Tries to ping device using .Net object.
4) if successful displays IP, if fails displays "Ping Failed".
For some reason the textbox updates from step 2 will not execute until the results from the ping is received and ready to update it's textbox.
Why? These are separate functions.
I've tried to paste the code here but won't let me as new account and thinks it includes off-site URLs.
Check it here at PasteBin: (pastebin . com / tE0iFT5f) Remove spaces.
EDIT: Adding info requested from automated post.
Did you remember to include the following?
Product: PowerShell Studio 2015 4.2.89 64 bit
Operating system: Windows 7 Enterprise 64 bit.
How it should work:
1) User enters hostname then clicks check status.
2) Host found in AD then retrieves info and updates AD status, OU and bitlocker Key textboxes and the AD group listbox.
3) Calls ping function, updates IP Address field to "Pinging" then ping returns result to IP textbox.
What is happening:
1) User enters hostname then clicks check status.
2) Host found in AD then retrieves info but AD status, OU and bitlocker Key textboxes don't update and only the first AD group found is returned to listbox.
3) Calls ping function, doesn't update IP Address field to "Pinging".
4) App/Form freezes until failed ping returns result to IP textbox then all other textboxes and listbox updates simultaneously.
I have screenies and can provide the code but the forum is preventing me from posting either stating "Antispam: You can't have off-site URLs in your posts until you have posted a few times".
1) When user clicks check status, a function is called to check if the pc exists in AD.
2) If it does it grabs info from AD and updates relevant textboxes on form.
3) Tries to ping device using .Net object.
4) if successful displays IP, if fails displays "Ping Failed".
For some reason the textbox updates from step 2 will not execute until the results from the ping is received and ready to update it's textbox.
Why? These are separate functions.
I've tried to paste the code here but won't let me as new account and thinks it includes off-site URLs.
Check it here at PasteBin: (pastebin . com / tE0iFT5f) Remove spaces.
EDIT: Adding info requested from automated post.
Did you remember to include the following?
Product: PowerShell Studio 2015 4.2.89 64 bit
Operating system: Windows 7 Enterprise 64 bit.
How it should work:
1) User enters hostname then clicks check status.
2) Host found in AD then retrieves info and updates AD status, OU and bitlocker Key textboxes and the AD group listbox.
3) Calls ping function, updates IP Address field to "Pinging" then ping returns result to IP textbox.
What is happening:
1) User enters hostname then clicks check status.
2) Host found in AD then retrieves info but AD status, OU and bitlocker Key textboxes don't update and only the first AD group found is returned to listbox.
3) Calls ping function, doesn't update IP Address field to "Pinging".
4) App/Form freezes until failed ping returns result to IP textbox then all other textboxes and listbox updates simultaneously.
I have screenies and can provide the code but the forum is preventing me from posting either stating "Antispam: You can't have off-site URLs in your posts until you have posted a few times".