Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Nazrul Islam
  Where is Nazrul Islam?
 Dhaka
 Bangladesh
 Nazrul Islam
 To: Ken Blum
  Where is Ken Blum?
 Chicago
 Illinois - United States
 Ken Blum
 Tags
Subject: RE: Scrolling A Form Using Keyboard
Thread ID: 34033 Message ID: 34163 # Views: 2 # Ratings: 0
Version: Visual FoxPro 8 Category: Forms
Date: Wednesday, December 10, 2003 5:20:03 AM         
   


Thanks Ken. It is working. I appreciate your help.

Nazrul
> > Thanks KTB for thinking on the issue. I tried but unfortunately it does not work.
> >
> > Nazrul
> >
> > > > My client wants to scroll through a long form using either down-arrow or page-down key instead of using the scroll bars. Is there any way of doing it in VFP 8? Can anybody help me!
> > >
> > > Just a thought - Use the KeyPress event of the form to trap for the keys, and then offset the top of form with THISFORM.SetViewPort
> > >
> > > KTB
>
> This code in the KeyPress Event of the form works for me. Don't forget to set the form's KeyPreview property to .T.
>
>
> LPARAMETERS nKeyCode, nShiftAltCtrl
> 
> WITH THISFORM
> 	IF nKeyCode = 18 AND .ViewPortTop > 0 && PageUp
> 		.SetViewPort(0,IIF(.Height > .ViewPortTop,0,.ViewPortTop - .Height))
> 		NODEFAULT
> 		RETURN
> 	ENDIF
> 	IF nKeyCode = 3 && PageDown
> 		.SetViewPort(0,.ViewPortTop + .Height)
> 		NODEFAULT
> 		RETURN
> 	ENDIF
> ENDWITH
> 

>
>
> KTB


ENTIRE THREAD

Scrolling A Form Using Keyboard Posted by Nazrul Islam @ 12/7/2003 8:15:47 AM
RE: Scrolling A Form Using Keyboard Posted by Ken Blum @ 12/8/2003 8:31:44 PM
RE: Scrolling A Form Using Keyboard Posted by Nazrul Islam @ 12/9/2003 5:37:53 AM
RE: Scrolling A Form Using Keyboard Posted by camil ghircoias @ 12/9/2003 3:22:25 PM
RE: Scrolling A Form Using Keyboard Posted by Yuri Rubinov @ 12/9/2003 3:58:46 PM
RE: Scrolling A Form Using Keyboard Posted by Ken Blum @ 12/9/2003 4:01:15 PM
RE: Scrolling A Form Using Keyboard Posted by Nazrul Islam @ 12/10/2003 5:20:03 AM