Форум: "Основная";
Текущий архив: 2002.05.06;
Скачать: [xml.tar.bz2];
ВнизКак добавить свой курсор? Найти похожие ветки
← →
sssa (2002-04-22 19:10) [0]А то стандартные такие убогие..
← →
cok (2002-04-22 19:51) [1]Рисуй свой в Image Editor, сохраняй как *.cur ...
← →
sssa (2002-04-22 21:00) [2]Да мне же не файлы курсоров нужны, а возможность из использования в дельфях!
Там в свойстве cursor нет возможности вставить свой!
← →
Adder (2002-04-22 21:53) [3]
м-да.. и зачем нужна кнопа F1 ??
%)
TScreen
property Cursors[Index: Integer]: HCursor;
Description
Use Cursor to access a particular cursor for use by the application or by a control within the application. TScreen includes several built-in cursors that are indexed by symbolic cursor constants. The image associated with the built-in cursors constants can be changed by setting the Cursors property.
Custom cursors can be added to the Cursors property for use by the application or any of its controls. To add a custom cursor to an application:
1 Create the cursor resource using a resource editor.
2 Declare a cursor constant with a value that does not conflict with an existing cursor constant.
3 Use the Windows API function LoadCursor to obtain a handle to the new cursor.
4 Set the Cursors property, indexed by the newly declared cursor constant, to the handle obtained from LoadCursor.
This example shows how to add custom cursors to an application. It assumes that a custom cursor with the name NewCursor has been added to the resources (.RES file) of the application. You can add the cursor using the image editor. (Tools | Image Editor)
The following code makes this cursor available to the application via the constant crMyCursor, and sets it as the global cursor to the application.
const
crMyCursor = 5;
procedure TForm1.FormCreate(Sender: TObject);
begin
Screen.Cursors[crMyCursor] := LoadCursor(HInstance, "NewCursor");
Cursor := crMyCursor;
end;
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2002.05.06;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.004 c