国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Delphi > 正文

在delphi中如何限制鼠標的移動區域。

2019-11-18 19:00:15
字體:
來源:轉載
供稿:網友
下面把鼠標的移動區域限制在(100,100,200,200)

var rect:TRect;
begin
  rect.Left:=100;
  rect.Top:=100;
  rect.Bottom:=200;
  rect.Right:=200;
  windows.ClipCursor(@rect);



下面恢復鼠標的移動區域
  windows.ClipCursor(0);

具體的列子就不用舉了吧,很簡單的。嘻嘻嘻嘻嘻

在delphi中的幫助是這么寫的:

The ClipCursor function confines the cursor to a rectangular area on the screen.
If a subsequent cursor position (set by the SetCursorPos function or the mouse)
lies outside the rectangle, Windows automatically adjusts the position to keep the
cursor inside the rectangular area.

BOOL ClipCursor(

    CONST RECT *lPRect     // pointer to structure with rectangle 
  );    


Parameters

lprc

Points to the RECT structure that contains the screen coordinates of the upper-
left and lower-right corners of the confining rectangle. If this parameter is
NULL, the cursor is free to move anywhere on the screen.



Return Values

If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The cursor is a shared resource. If an application confines the cursor, it must
release the cursor by using ClipCursor before relinquishing control to another
application.
The calling process must have WINSTA_WRITEATTRIBUTES access to the window station.

上一篇:在DELPHI中用線程排序

下一篇:一個實用的Delphi屏幕拷貝程序的設計

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
學習交流
熱門圖片

新聞熱點

疑難解答

圖片精選

網友關注

主站蜘蛛池模板: 德昌县| 武川县| 临高县| 曲阜市| 东至县| 湘西| 海口市| 措勤县| 甘南县| 疏附县| 名山县| 曲阜市| 绥阳县| 洪雅县| 佛山市| 丹江口市| 林周县| 赣州市| 平邑县| 广西| 东乡县| 祁门县| 门源| 南丹县| 南乐县| 衡东县| 镇沅| 通化县| 玛曲县| 绥江县| 博兴县| 闵行区| 诸暨市| 咸阳市| 珲春市| 陆河县| 罗田县| 汶上县| 天柱县| 鄄城县| 通海县|