Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keypress problem
Message
De
26/03/2007 12:02:17
 
 
À
26/03/2007 12:00:09
Reza Meamar
Homa Programming Group
Shiraz, Iran
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Divers
Thread ID:
01208497
Message ID:
01208498
Vues:
30
Form.Keypreview=.T. allows to fire both form and control code.
Form.Keypreview=.F. allows to fire control code only.


>Dear all,
>I have a form as below
>
>PUBLIC oform1
>oform1=NEWOBJECT("form1")
>oform1.Show
>RETURN
>
>*
>DEFINE CLASS form1 AS form
>
>	Height = 144
>	Width = 283
>	DoCreate = .T.
>	Caption = "Form1"
>	KeyPreview = .T.
>	Name = "Form1"
>
>
>	ADD OBJECT text1 AS textbox WITH ;
>		Height = 23, ;
>		Left = 91, ;
>		Top = 60, ;
>		Width = 100, ;
>		Name = "Text1"
>
>
>	PROCEDURE KeyPress
>		LPARAMETERS nKeyCode, nShiftAltCtrl
>		IF nKeyCode = 134   && F12
>		   WAIT WINDOW 'this is second' TIMEOUT 1
>		ENDIF
>	ENDPROC
>
>
>	PROCEDURE text1.KeyPress
>		LPARAMETERS nKeyCode, nShiftAltCtrl
>		IF nKeyCode = 134   && F12
>		   WAIT WINDOW 'this is first' TIMEOUT 1
>		ENDIF
>	ENDPROC
>
>
>ENDDEFINE
>
>
>But i want to see 'this is first' so 'this is second' when i press F12.
>Can i do this?
>Thanks
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform