WiseJ Async Issues

0
0

Hi, i trying to use the Application.StartTask Async but its not working for me, i need to clikc in the page to make the UI UPDATE.

I have something like this:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Button1.Hide()
PictureBox2.Show()
Button2.Enabled = False
Application.StartTask(Function()
Try
‘my stuff…

Label1.Hide()

Label2.Text = “Testing”
Catch ex As Exception

End Try
Application.Update(Me)
End Function)
End Sub

However, this is not working at all, its weird because it looks like sometiems it works and sometimes don’t so i can’t really undestand how to fix this, the only way wich is bad that i found to fix this is adding a timer and put 100ms refresh with the code Me.Refresh and Me.Update to make the UI update…

Please i really need help at this point…

  • You must to post comments
0
0

Hi Ruben,

It looks like WebSocket is disabled in your environment,
You can check its state in Wisej using “Application.IsWebSocket”, in a click event, if you’re doing it in the Main call you’ll always get False!

If it’s indeed disabled, then you’ll have to enable it and check the results!

HTH,
Alaa

  • You must to post comments
0
0

Hi Ruben,

please provide us with a full compilable test case showing what you try to achieve.

Best regards
Frank

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.