Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to hide mouse when selecting by key in drop down com
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Divers
Thread ID:
00961998
Message ID:
00962710
Vues:
7
Hi Dawa,

Try if this code will work for you:
CLEAR
CLEAR ALL

oForm = CREATEOBJECT("TForm")
oForm.Show(1)

DEFINE CLASS TForm As Form

	ADD OBJECT txt As TextBox WITH Left=5,;
	Top=10, Height=24, Width=100

	ADD OBJECT cmb As ComboBox WITH Left=5,;
	Top=30, Height=24, Width=100, Style=2

PROCEDURE Init
	DECLARE INTEGER ShowCursor IN user32 INTEGER bShow

PROCEDURE Destroy
	ThisForm._show

PROCEDURE cmb.Init
	THIS.AddItem("Anne")
	THIS.AddItem("Bob")
	THIS.AddItem("Chris")
	THIS.AddItem("Dan")
	THIS.AddItem("Evan")
	THIS.AddItem("Frank")
	THIS.AddItem("George")

PROCEDURE txt.GotFocus
	ThisForm._show

PROCEDURE cmb.GotFocus
	ThisForm._hide

PROCEDURE _hide
	DO WHILE ShowCursor(0) >= -1
		DOEVENTS
	ENDDO

PROCEDURE _show
	DO WHILE ShowCursor(1) < 0
		DOEVENTS
	ENDDO
ENDDEFINE
ShowCursor API is used to hide and show mouse pointer. When the pointer is hidden the mouse is still active. The code is kind of "fast and dirty", still it may help :)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform