Accessing a control's methods via window handle

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a window handle to a richedit control running in a separate process within our .net application framework. Is there a simple way in .net to use the handle to get to the instance of the actual object such that i can call the objects methods.

I am hoping for something better/easier/more understandable than writting a message hook dllb.

Thanks

Mark
 
Mark,

There isn't going to be a way to do this, I believe. The Handle
property on the Control class is read only, so you won't be able to create a
new instance of RichEditTextBox and set the handle to that.

What you should do is expose an object with methods that you want called
from the other app, and call them through remoting, or some other
interprocess mechanism.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Mark said:
I have a window handle to a richedit control running in a separate process
within our .net application framework. Is there a simple way in .net to use
the handle to get to the instance of the actual object such that i can call
the objects methods.
 
Back
Top