I use an external program, which works with the clipboard interface, to pass parameters and open patients. The case is that I am doing a program in vb.net in which I pass the parameters to that external program using the clipboard, with this line:
My.Computer.Clipboard.SetText (myTextWithParameters)
and the external application which is always running, gets that data and returns some values. But the problem is that in my vb.net application when inserting the line
My.Computer.Clipboard.SetText (textClipboardInfo)
, I directly skip an error:
Catch ex As Exception
MessageBox.Show (ex.GetType (). FullName)
MessageBox.Show (ex.Message.ToString)
End Try
In the ex.GetType (). FullName
-> I get the following: System.Runtime.InteropServices.ExternalException.
I think this is because there is another process that is using the clipboard, which in this case is my external program, but I can not close it because it has to be running to be able to pass the parameters.
I hope I have made myself clear.
Any help is appreciated.