February 3, 2002

Clipping the mouse to a rectangle area

The Clip property of the Cursor is the rectangle within which the mouse cursor is confined, or its value is Nothing if the mouse can move over the entire screen. This rectangle is in screen coordinates, so you must do some conversions if you want to confine the mouse to

Pasting data from the Clipboard

Pasting data from the clipboard requires more code because you must ascertain whether the clipboard contains data in one of the formats you’re willing to process. First, use the Clipboard.GetDataObject to retrieve an IDataObject object. Next, use the GetDataPresent method of this IDataObject object to determine whether the clipboard contains