Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form keypress Conundrum
Message
From
11/01/2006 11:40:59
 
 
To
11/01/2006 11:30:17
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01085658
Message ID:
01085689
Views:
31
Works like a charm!!!! Thanks so much!
Here is my updated keypress event:
LPARAMETERS nKeyCode, nShiftAltCtrl

WITH THISFORM.PAGEFRAME
   DO CASE
      CASE nKeyCode = 18 .AND. nShiftAltCtrl = 0  && Page Up
         NODEFAULT
         IF VARTYPE(thisform.activecontrol) = "O" .and. !ISNULL(thisform.activecontrol)
	     thisform.activecontrol.setfocus()
    	 ENDIF
         IF .ACTIVEPAGE > 1
            .ACTIVEPAGE = .ACTIVEPAGE - 1
         ELSE
            .ACTIVEPAGE = .PAGECOUNT
         ENDIF
         DO CASE
            CASE .ACTIVEPAGE = 1
               .Page1.txtMap_csr.SETFOCUS()
            CASE .ACTIVEPAGE = 2
               .Page2.txtYn_split.SETFOCUS()
            CASE .ACTIVEPAGE = 3
               .Page3.txtAdr_name1.SETFOCUS()
            CASE .ACTIVEPAGE = 4
               .Page4.txtLp_chg.SETFOCUS()
            CASE .ACTIVEPAGE = 5
               .Page5.txtMendo_q1.SETFOCUS()
            CASE .ACTIVEPAGE = 6
               .Page6.txtMendo_q81.SETFOCUS()
         ENDCASE
      CASE nKeyCode = 3  .AND. nShiftAltCtrl = 0   && Page Down
         NODEFAULT
         IF VARTYPE(thisform.activecontrol) = "O" .and. !ISNULL(thisform.activecontrol)
	    thisform.activecontrol.setfocus()
    	 ENDIF
         IF .ACTIVEPAGE < .PAGECOUNT
            .ACTIVEPAGE = .ACTIVEPAGE + 1
         ELSE
            .ACTIVEPAGE = 1
         ENDIF
         DO CASE
            CASE .ACTIVEPAGE = 1
               .Page1.txtMap_csr.SETFOCUS()
            CASE .ACTIVEPAGE = 2
               .Page2.txtYn_split.SETFOCUS()
            CASE .ACTIVEPAGE = 3
               .Page3.txtAdr_name1.SETFOCUS()
            CASE .ACTIVEPAGE = 4
               .Page4.txtLp_chg.SETFOCUS()
            CASE .ACTIVEPAGE = 5
               .Page5.txtMendo_q1.SETFOCUS()
            CASE .ACTIVEPAGE = 6
               .Page6.txtMendo_q81.SETFOCUS()
         ENDCASE
      OTHERWISE
         DODEFAULT()
   ENDCASE
ENDWITH
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform