Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keep mouse pointer off when using Alert() function

Status
Not open for further replies.

N9682A

Programmer
Apr 8, 2002
6
US
Is there any way to keep the mouse pointer off when using the alert() function? My clipper app is totally mouse disabled and I never want to see the mouse pointer. I use

mSetCursor(.f.)
set cursor off
setcursor(0)

but the mouse pointer still comes on when using the alert() function. I am using Clipper 5.3 and linking with Exospace and running on a W2K and WinXP machine.

Thanks!
 
Is your screen in full screen mode?

Before running your application try this

Mode con: cols=80 lines=25 (at the dos prompt)

Then the mouse cursor will disappear! Please let me know if this helped you :)

Tekno
Wireless Toyz
Ypsilanti, Michigan
 
Yes, it is running in full screen mode. The only time the mouse pointer becomes visible is when I call the alert() function. I need to know if there is a way to call the
alert() function without enabling the mouse pointer. Do I have access to the alert() function code so I can modify it or is it all binary code?
 
I never used the Alert as it is kind of Primitive, so I developed my own "messagebox" with up to 3 line message parameters and 2 buttons (OK - Cancel)
Also, you can pass the Caption of the buttons

Check it out...

Very nice one (well, cuz I did it I guess :) )

**************************
Function TeknoMess(mess1,mess2,mess3,prmpt1,prmpt2)
Local cScreen,nOpt,ncolor,nCol
ncolor := setcolor()
nCol = 12
do case
case pcount() < 0
return
case pcount() < 2
mess2 = &quot;&quot;
mess3 = &quot;&quot;
nCol = 10
case pcount() < 3
mess3 = &quot;&quot;
nCol = 11
endcase
if pcount() <4
prmpt1 = &quot; CANCEL &quot;
prmpt2 = &quot; OK &quot;
ENDIF
save screen to cScreen
set color to w+/r
@ 08,20 clear to nCol+2,56
@ 08,20 to nCol+2,56 color &quot;gr+/r&quot;
shadow(08,20,nCol+2,56)
@ 09,21 say TEKNOCENTER(mess1) COLOR &quot;w+/r&quot;
if mess2 = &quot;&quot;
@ 10,21 say TEKNOCENTER(mess2) COLOR &quot;w+/r&quot;
endif
if mess3 = &quot;&quot;
@ 11,21 say TEKNOCENTER(mess3) COLOR &quot;w+/r&quot;
endif
set color to w+/r,w+/b
@ nCol+1,28 prompt prmpt1
@ nCol+1,42 prompt prmpt2
MENU TO nOpt
if lastkey() = 27
nOpt = 1
endif
set Color to (nColor)
@ 08,20 clear to nCol+2,55
restore screen from cScreen
Return nOpt
****************
Function Teknocenter(mess)
private L,D,J

if len(mess) > 35
MESS = SUBSTR(MESS,1,35)
endif
L=len(mess)
D=int((35-L)/2)
J=35-D-L
mess =space(D)+mess+space(J)
return (mess)
******************
Please let me know if this helped you :)

Tekno
Wireless Toyz
Ypsilanti, Michigan
 
Thanks - I'll give it a try and let you know!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top