Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keypress problem
Message
From
26/03/2007 12:12:40
Reza Meamar
Homa Programming Group
Shiraz, Iran
 
 
To
26/03/2007 12:02:17
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01208497
Message ID:
01208502
Views:
25
But i have some key definition in my form KeyPress event.
it is an example.


>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform