Windows Forms custom control: focus and cursor keys without UIPermissionWindow.AllWindows
问题 I want to write a custom control (a text editor) for Windows Forms, which should include the following functionality: Gets the keyboard focus, when you click on it with the mouse Sees all keyboard input (including cursor keys), when it has the focus, Can run in a semi-trusted environment, with UIPermissionWindow.SafeTopLevelWindows (i.e. it shouldn't require UIPermissionWindow.AllWindows ) Is there any example of doing this? Some of the methods which I might want to use, like Control.Focus()