public FocusCatcher(IntPtr hParent)
{
CreateParams cp = new CreateParams();
// Any old title will do as it will not be shown
cp.Caption = "NativeFocusCatcher";
// Set the position off the screen so it will not be seen
cp.X = -1;
cp.Y = -1;
cp.Height = 0;
cp.Width = 0;
// As a top-level window it has no parent
cp.Parent = hParent;
// Create as a child of the specified parent
cp.Style = unchecked((int)(uint)Win32.WindowStyles.WS_CHILD +
(int)(uint)Win32.WindowStyles.WS_VISIBLE);
// Create the actual window
this.CreateHandle(cp);
}
}