Hi @Marc Menzel ,
In WinForms, you cannot directly create or interact with UI controls like forms from a thread other than the main UI thread. Therefore, invoking the creation and display of the form on the UI thread is necessary.
Dim CurrentBellIngingForm As New BellRingingForm()
If frmMain.InvokeRequired Then
frmMain.Invoke(New Action(Sub() CurrentBellIngingForm.Show()))
Else
CurrentBellIngingForm.Show()
End If
Best Regards.
Jiachen Li
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.