This tutorial will show you the cross-thread problem and how to solve it. This problem is encountered when trying to trigger some controllers inside your application from the code of another controler in Visual Basic .Net using Visual Studio 2019 IDE.
The Code to solve this error:
*******************************************************
Control.CheckForIllegalCrossThreadCalls = False
# Disable Warning
Threading.Thread.CurrentThread.ApartmentState = Threading.ApartmentState.STA
# Enable Warning
*******************************************************
NOTE: Place this code inside Form Load Sub Function in every form in your application.
Subscribe to the channel to keep receiving our new tutorials.
[ Ссылка ]
Visual Basic .Net (Visual Studio VB.Net) Lessions and Tutorials Playlist:
[ Ссылка ]
#vb_net
#visualbasic
#visualstudio
All rights reserved. The Tech Remedy 2020
Ещё видео!