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?
You have to access the Handle property (put the result in a dummy variable or something). Look in Reflector; it forces handle creation.
Try to overload CreateParams
property getter. In it clear the WS_VISIBLE
flag.
I had the same problem with some other controls and used the Control.CreateControl()
method:
private void CheckForExistingHandle(Control control)
{
if (!control.IsHandleCreated)
control.CreateControl();
}
But i don't know how it works with a print module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With