M
Michael Maes
Hello,
I have an Mdi-application which also is a remoting-server (Ipc).
Several instances can co-exist on the same machine.
I have a small app (search-engine) (remoting-client) which calls a sub on
the MDI (specific instance) thus retrieving eg the data of a certain customer.
If the customer childform is already instanciated, there is no problem.
If the destination-childform is not yet open, it will be opened like this:
' Create an instance of the form
If Childform.frmInstallations Is Nothing Then
Childform.frmInstallations = New frmInstallations
With Childform.frmInstallations
.MdiParent = MDI ' This variable creates a threading-issue
.Show(Commands.ReadAllowed("InstallationsOverview"))
End With
Else
It is the assignment of the MdiParent which poses the problem.
'MDI' is a variable which references the instance of the Main (mdi) Form
(frmMain).
The generated exception is this: "Cross-thread operation not valid: Control
'frmMain' accessed from a thread other than the thread it was created on."
How can I solve this threading-issue?
TIA,
Michael
I have an Mdi-application which also is a remoting-server (Ipc).
Several instances can co-exist on the same machine.
I have a small app (search-engine) (remoting-client) which calls a sub on
the MDI (specific instance) thus retrieving eg the data of a certain customer.
If the customer childform is already instanciated, there is no problem.
If the destination-childform is not yet open, it will be opened like this:
' Create an instance of the form
If Childform.frmInstallations Is Nothing Then
Childform.frmInstallations = New frmInstallations
With Childform.frmInstallations
.MdiParent = MDI ' This variable creates a threading-issue
.Show(Commands.ReadAllowed("InstallationsOverview"))
End With
Else
It is the assignment of the MdiParent which poses the problem.
'MDI' is a variable which references the instance of the Main (mdi) Form
(frmMain).
The generated exception is this: "Cross-thread operation not valid: Control
'frmMain' accessed from a thread other than the thread it was created on."
How can I solve this threading-issue?
TIA,
Michael