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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CURSOR SHAPE

Status
Not open for further replies.

JaneJantz

Programmer
Sep 13, 2000
55
US
Does anyone know how to change the cursor shape in foxpro 2.6a for windows. It is a small vertical line, and sometimes hard to find on a screen.

Thanks for your help.
 
Nope, it's provided by Windows. In VFP, people will often change the background color in the GotFocus() and LostFocus() methods to help locate the cursor position.

Rick
 
OK, then are you aware of any windows settings that can change the shape...or maybe any little utilities available that will change it?
 
Since Fox 2.x was developed during the Windows 3.x era, it was compiled using whatever version of MS Win 16 bit api was around at the time. You would probably have to modify Fox itself, and recompile it with a newer api to get what you want.

Dave S.
 
to change cursor shape you can use foxtools.fll; this example come from "Goodies" directory of Foxpro 2.6 (in french)
*-------------------- hourglas.prg ----------------------

* Ce programme montre comment transformer le curseur en
* un sablier puis le restaurer

* Voici les formes prédéfinies de curseur
#define IDC_ARROW (32512)
#define IDC_IBEAM (32513)
#define IDC_WAIT (32514)
#define IDC_CROSS (32515)
#define IDC_UPARROW (32516)
#define IDC_SIZE (32640)
#define IDC_ICON (32641)
#define IDC_SIZENWSE (32642)
#define IDC_SIZENESW (32643)
#define IDC_SIZEWE (32644)
#define IDC_SIZENS (32645)

set library to sys(2004)+"foxtools.fll" additive

loadcsr = regfn("LoadCursor", "IL", "I")
setcsr = regfn("SetCursor", "I", "I")

oldcsr = callfn(setcsr, callfn(loadcsr, 0, IDC_wait))

for i = 1 to 3000000 && à ajuster à votre ordinateur
next && cela peut prendre un momemt !

=callfn(setcsr, oldcsr)

release library sys(2004)+"foxtools.fll"
 
While that code will indeed change the pointing cursor shape, it will NOT effect the "cursor" in a textbox (GET) - it will remain the thin line.

Rick
 
Would there be a way to change the color of the active get in a color scheme (scheme #1) from the other gets in the same read?
 
Hi Jane,

My first thought would be to do this from within the WHEN clause of the object. You could call a generic routine for this along the lines of

FUNCTION FocusOn
SHOW GET _CUROBJ COLOR SCHEME <A>
RETURN .T.

In order to remove the hilite color, you'd have to adapt the VALID clause of the object to call another generic

FUNCTION FocusOff
SHOW GET _CUROBJ COLOR SCHEME <B>
RETURN .T.

Admittedly this is untested, but it could work for you.

Best regards,

Jan Schenkel.

&quot;As we grow older, we grow both wiser and more foolish at the same time.&quot; (De Rochefoucald)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top