線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:884
推到 Plurk!
推到 Facebook!

那個API function 能夠設定現狀游標?

答題得分者是:coolman
AMD支持者
一般會員


發表:7
回覆:11
積分:3
註冊:2004-04-19

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-06-25 14:48:43 IP:221.127.xxx.xxx 未訂閱
那個
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#2 引用回覆 回覆 發表時間:2004-06-25 15:14:21 IP:147.8.xxx.xxx 未訂閱
SetCursor. But I think VCL uses its own mechanism to change the cursor regularly, so you may need to set the cursor frequently.
AMD支持者
一般會員


發表:7
回覆:11
積分:3
註冊:2004-04-19

發送簡訊給我
#3 引用回覆 回覆 發表時間:2004-06-25 15:18:34 IP:221.127.xxx.xxx 未訂閱
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#4 引用回覆 回覆 發表時間:2004-06-25 15:31:06 IP:147.8.xxx.xxx 未訂閱
What do you want to do? Maybe Screen.Cursor works for you?
AMD支持者
一般會員


發表:7
回覆:11
積分:3
註冊:2004-04-19

發送簡訊給我
#5 引用回覆 回覆 發表時間:2004-06-25 16:06:59 IP:221.127.xxx.xxx 未訂閱
我想:當一個
Fishman
尊榮會員


發表:120
回覆:1949
積分:2163
註冊:2006-10-28

發送簡訊給我
#6 引用回覆 回覆 發表時間:2004-06-25 16:25:05 IP:210.65.xxx.xxx 未訂閱
Hi AMD支持者,    誠如 william 版大所言,設定 Screen.Cursor 即可    
procedure TForm1.Button1Click(Sender: TObject);
begin
  Screen.Cursor := crHourGlass;
  ...
  Screen.Cursor := crDefault;
end;
---------------------------------- 小弟才疏學淺,若有謬誤尚請不吝指教 ----------------------------------
------
Fishman
AMD支持者
一般會員


發表:7
回覆:11
積分:3
註冊:2004-04-19

發送簡訊給我
#7 引用回覆 回覆 發表時間:2004-06-25 16:33:58 IP:221.127.xxx.xxx 未訂閱
引言: Hi AMD支持者, 誠如 william 版大所言,設定 Screen.Cursor 即可
procedure TForm1.Button1Click(Sender: TObject);
begin
  Screen.Cursor := crHourGlass;
  ...
  Screen.Cursor := crDefault;
end;
---------------------------------- 小弟才疏學淺,若有謬誤尚請不吝指教 ---------------------------------- < face="Verdana, Arial, Helvetica"> 但必須用windowsAPI!因為我不是用delphi!! 那個
coolman
一般會員


發表:11
回覆:17
積分:17
註冊:2002-12-05

發送簡訊給我
#8 引用回覆 回覆 發表時間:2004-06-25 17:51:03 IP:61.218.xxx.xxx 未訂閱
The SetCursor function establishes the cursor shape. HCURSOR SetCursor( HCURSOR hCursor // handle of cursor ); Parameters hCursor Identifies the cursor. The cursor must have been created by the CreateCursor or loaded by the LoadCursor or LoadImage function. If this parameter is NULL, the cursor is removed from the screen. Windows 95: The width and height of the cursor must be the values returned by the GetSystemMetrics function for SM_CXCURSOR and SM_CYCURSOR. In addition, the cursor bit depth must match the bit depth of the display or the cursor must be monochrome. Return Values The return value is the handle of the previous cursor, if there was one. If there was no previous cursor, the return value is NULL. Remarks The cursor is set only if the new cursor is different from the previous cursor; otherwise, the function returns immediately. The cursor is a shared resource. A window should set the cursor shape only when the cursor is in its client area or when the window is capturing mouse input. In systems without a mouse, the window should restore the previous cursor before the cursor leaves the client area or before it relinquishes control to another window. If your application must set the cursor while it is in a window, make sure the class cursor for the specified window's class is set to NULL. If the class cursor is not NULL, the system restores the class cursor each time the mouse is moved. The cursor is not shown on the screen if the internal cursor display count is less than zero. This occurs if the application uses the ShowCursor function to hide the cursor more times than to show the cursor. See Also CreateCursor, GetCursor, GetSystemMetrics, LoadCursor, LoadImage, SetCursorPos, ShowCursor
AMD支持者
一般會員


發表:7
回覆:11
積分:3
註冊:2004-04-19

發送簡訊給我
#9 引用回覆 回覆 發表時間:2004-06-25 20:04:44 IP:221.127.xxx.xxx 未訂閱
謝謝
系統時間:2024-06-24 21:27:59
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!