Force create handle for Control

Marc Vitalis picture Marc Vitalis · Nov 27, 2009 · Viewed 11k times · Source

I'm currently creating a silent print module. The current control I'm using is, it's making sure that the control handle is already created (IsHandleCreated). I did everything to cheat this with no luck at all.

Do you have ideas in mind on how can I create a handle for the control without displaying any in the screen?

Answer

wj32 picture wj32 · Jul 20, 2010

You have to access the Handle property (put the result in a dummy variable or something). Look in Reflector; it forces handle creation.