DelphiFAQ Home Search:
General :: Windows :: Programming :: Windows with Delphi :: Windows Forms
Code snippets, Q+A around the Windows user interface. From a Delphi perspective, but usually applicable to other languages.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

This is the FULL list of all articles in this category.

Featured Article

Position the mouse on the screen

This is done with the API function SetCursorPos(x, y).

Note: Since this function does not get a windows handle as a parameter, x, y have to be screen coordinates.
Your component does use relative coordinates, e.g. relative to a TPanel or to the owning TForm. You may use the function ClientToScreen to calculate the proper screen coordinates.