dsm1995gst
Member
- Joined
- Apr 29, 2011
- Messages
- 16
- Programming Experience
- 1-3
I've got a button_click function that calls a Powershell script and outputs the results into a text box. This sometimes take a few seconds, so I wanted to first change the .text of the textbox (called Results) to "Please wait... searching remote PC" so the user knows the program is actually doing something.
However, the text will not change. It basically waits to change the text of the text box until the Powershell script is finished, and by that point it is obviously too late. I also tested by creating a label and making the label say "Please wait... searching remote PC," but it does not change the text value of the label until the Powershell function is finished.
If I test it by displaying a messagebox that says "Please wait... searching remote PC," the message box appears immediately.
Any ideas?
VB.NET:
Results.Text = "Please wait... searching remote PC"
Results.Text = RunScript(LoadScript(fullPCinfoScript))
VB.NET:
Label1.Text = "Please wait... searching remote PC"
Results.Text = RunScript(LoadScript(fullPCinfoScript))
VB.NET:
MessageBox.Show("Please wait... searching remote PC")
Results.Text = RunScript(LoadScript(fullPCinfoScript))