Skip to content

Getting a control from a handle

No I Wi ll Not Tell

Asked Apr 9, 2007, 2:10 PM EDT2 answers
Share
LinkedInX

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?

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.