Я хочу скрыть курсор рука из настольного приложения Java с виртуальной клавиатурой, где, когда курсор мыши находится над каждым числом, курсор изменяется на стиль рука.
Я попробовал следующий код, используя прозрачное изображение (файл .cur) в качестве ресурса, но не смог скрыть курсор hand.
Можно ли скрыть курсор рука от такого элемента?
program Project1;
{$APPTYPE CONSOLE}
{$R *.res}
{$R 'mycursor.res'}
uses
Windows,
Messages,
SysUtils;
procedure MyShowCursor(Show: Boolean);
const
OCR_HELP = 32651;
var
xCursor: HCURSOR;
begin
if Show then
SystemParametersInfo(SPI_SETCURSORS, 0, 0, WM_SETTINGCHANGE or SPIF_UPDATEINIFILE)
else
begin
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_NORMAL);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_APPSTARTING);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_CROSS);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_HAND);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_HELP);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_IBEAM);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_NO);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_SIZEALL);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_SIZENESW);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_SIZENS);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_SIZENWSE);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_SIZEWE);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_UP);
xCursor := LoadCursor(HInstance, 'XCURSOR');
SetSystemCursor(xCursor, OCR_WAIT);
end;
end;
begin
try
MyShowCursor(False);
Sleep(15000);
MyShowCursor(True);
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
Readln;
end.