Getting a control from a handle

Apr 9 2007 6:10 PM

Firstly: I am making a program that will, hopefully, insert a panel into a running instance of notepad. This is possible by the following scenario

MyControl.Parent = Control

now my dillema is that i can get the handle of a running instance of notepad... but that doesn't do me any good since this scenario raises a compiler error

MyControl.Parent = FindWindow(null, "Untitled - Notepad"); //FindWindow returns the handle

Anybody know the soloution?


Answers (2)