国产探花免费观看_亚洲丰满少妇自慰呻吟_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屏幕拷貝程序的設計

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

新聞熱點

疑難解答

圖片精選

網友關注

主站蜘蛛池模板: 马尔康县| 板桥市| 扎兰屯市| 田阳县| 无极县| 左贡县| 灵宝市| 宁晋县| 崇阳县| 北京市| 阿克苏市| 田阳县| 改则县| 开阳县| 西峡县| 南京市| 海门市| 周至县| 东安县| 晴隆县| 崇义县| 仲巴县| 柘城县| 南充市| 达尔| 睢宁县| 龙江县| 定结县| 措美县| 钟山县| 招远市| 浮梁县| 塔河县| 子洲县| 渝北区| 图木舒克市| 九江市| 百色市| 西吉县| 驻马店市| 禹城市|