Board index » delphi » Mouse Cursor Problems

Mouse Cursor Problems

Quote
Shaun wrote:

> I'm using a Dos version of turbo pascal.

> I have program that reads the position of the mouse cursor on the screen,
> waits for a click, then depending on where the cursor is branches to another
> screen. So in effect I have a simple mouse controlled menu system.

> The problem is when a new screen is comes up the program insists on displaying
> the character that what was under the mouse cursor on the previous sceen. This
> leads to stray characters appearing on the screen

> Is there a fix ?

 You must hide the mouse first before allowing new screens.

 If you use the build in Hide function in the mouse driver it does
keep a count on how many times it was issued a showmouse, so if you
want to hide the mouse.? you must use the hide mouse the same number
of times to get it to properly hide.

 

Re:Mouse Cursor Problems


I'm using a Dos version of turbo pascal.

I have program that reads the position of the mouse cursor on the screen,
waits for a click, then depending on where the cursor is branches to another
screen. So in effect I have a simple mouse controlled menu system.

The problem is when a new screen is comes up the program insists on displaying
the character that what was under the mouse cursor on the previous sceen. This
leads to stray characters appearing on the screen

Is there a fix ?

Re:Mouse Cursor Problems


Quote
Shaun wrote:
> I'm using a Dos version of turbo pascal.

> I have program that reads the position of the mouse cursor on the screen,
> waits for a click, then depending on where the cursor is branches to another
> screen. So in effect I have a simple mouse controlled menu system.

> The problem is when a new screen is comes up the program insists on displaying
> the character that what was under the mouse cursor on the previous sceen. This
> leads to stray characters appearing on the screen

> Is there a fix ?

Yes.  Hide the mouse before changing to the new screen, then show it
again after the new screen is redrawn.  Just about any mouse driver
should have a hidemouse() or similarly named procedure.  If not, you can
call int 33h with AX=0002h to hide it.

--
Scott Earnest        | We now return you to our regularly |
set...@ix.netcom.com | scheduled chaos and mayhem. . . .  |

Re:Mouse Cursor Problems


Quote
Shaun wrote:

> I'm using a Dos version of turbo pascal.

> I have program that reads the position of the mouse cursor on the screen,
> waits for a click, then depending on where the cursor is branches to another
> screen. So in effect I have a simple mouse controlled menu system.

> The problem is when a new screen is comes up the program insists on displaying
> the character that what was under the mouse cursor on the previous sceen. This
> leads to stray characters appearing on the screen

> Is there a fix ?

Hi,

I've had the same thing happen - sometimes. You should have a command
available for turning the Mouse Cursor
ON and OFF. Turning it off at the right time may solve this problem.

--
Val Mehling - anti-spam in effect.
For e-mail reply to:
  va...@ix.netcom.com

Other Threads