Board index » cppbuilder » Re. How to change cursor type

Re. How to change cursor type


2006-12-15 05:22:01 AM
cppbuilder27
Quote
David Ayre wrote in Article <4581a861$ XXXX@XXXXX.COM >
with Subject: How to change cursor type, on 14.12.2006 19:39:13



Hi,

I am using BDS 2006 with Win XP and I am developing an application.
When the programme starts, a ComboBox appears in the Dropdown
position but the cursor is in the form of an hourglass. I don't
know why this happens and I've tried adding the line:-

Cursor = crArrow;
Hey David,
1st you can set the Cursor-Type for each Control at the Design-Time
via Cursor Property, i don't know the BDS Environement, but for
BCB there is a VCL Example how to set Cursor Types at Runtime :
TCursor Save_Cursor = Screen->Cursor; //save actual cursor
Screen->Cursor = crHourGlass; // set cursor as hourglass
try
{
// code for the hourglass session
}
__finally
{
Screen->Cursor = Save_Cursor; // restore old cursor type
}
Regards
Elmar Baumann
------------------------------------------------------------------------------
Indy9 NNTP Internet News Reader/Writer, E. Baumann Software 2005
«Online on IRC, irc.p2p-network.net, #CodersPlanet?
Portions of this Software are Copyright (c) 1993 - 2005,
Chad Z. Hower (Kudzu) and the Indy Pit Crew
<www.IndyProject.org/>
 
 

Re:Re. How to change cursor type

Hi Elmar,
Thanks for your help. I have put in an instruction:-
Screen->Cursor = crArrow;
and this has solved the problem, though I still don't know why
the Screen Cursor set itself to crHourGlass.
Cheers,
David
==========================================================
Quote
Hey David,
1st you can set the Cursor-Type for each Control at the Design-Time
via Cursor Property, i don't know the BDS Environement, but for
BCB there is a VCL Example how to set Cursor Types at Runtime :


TCursor Save_Cursor = Screen->Cursor; //save actual cursor

Screen->Cursor = crHourGlass; // set cursor as hourglass

try
{
// code for the hourglass session
}
__finally
{
Screen->Cursor = Save_Cursor; // restore old cursor type
}


Regards

Elmar Baumann






------------------------------------------------------------------------------
Indy9 NNTP Internet News Reader/Writer, E. Baumann Software 2005
«Online on IRC, irc.p2p-network.net, #CodersPlanet?

Portions of this Software are Copyright (c) 1993 - 2005,
Chad Z. Hower (Kudzu) and the Indy Pit Crew
<www.IndyProject.org/>