i don't see how you can get a handle to a console
that isn't in your process group. (that doesn't mean
there isn't a way). and without that you can't call
functions like SetConsoleCursorinfo. this looks hard.
something that might work though - try setting the
registry key HKCU\Console\CursorSize. i think it controls
the percentage of the character cell consumed by the
cursor (100% would be a "block")
all kinds of problems and unanswered questions: this
will presumably affect all console apps on the logged on
user's desktop. Not sure how you force the console app
to refresh the display settings from the registry. Not
sure what you do when the logged on user doesn't have
write permissions to that registry key. If there's
a way to get notifications of registry changes you could
trigger your monitor with that instead of driving
it with a timer.
this actually doesn't sound all that promising, but
maybe it will lead to something that is.
i'd be interested to hear how/if you end up solving
this one.
-ns
----- Original Message -----
From: "Neven MacEwan" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Monday, August 20, 2001 5:05 AM
Subject: [DUG]: Offtopic - DOS Cursors
> Hi All
>
> I'm trying to set the cursor in a windows 2000 dos box, externally from
> another task
> essentially I want to write a task for win2k that sits in the background,
> waits for the occurance of a DOS
> box and at regular intervals set the cursor in this dos box to a block
> cursor (this is to counter a legacy apps annoying habit
> of setting the cursor to a near invisible underscore)
>
> Has any of you attempted this? Has anyone any ideas?
>
> TIA
>
> Regards Neven
> N.K. MacEwan B.E. E&E
> Ph 649 574 0027
> Fax 649 570 2706
> [EMAIL PROTECTED]
>
> "A truth denied the light of action will wither to a promise, propaganda
and
> then a lie"
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/