Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keyboard Paging
Message
 
 
À
05/04/2000 14:26:07
Gil Munk
The Scarborough Group, Inc.
Baltimore, Maryland, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Divers
Thread ID:
00355831
Message ID:
00357309
Vues:
26
Hi Gil,

From your description, I assume that you mean that you are trying to create the Windows equivalent of Alt-Tab (which switches between windows applications) for the pages of a pageframe. The following steps will show a pageframe that you can cycle through the pages using CTRL+RIGHTARROW and CTRL+LEFTARROW

1. Create a form
2. Set KeyPreview to .T.
3. Drop a pageframe on it and name it pgfTest, and set its pagecount to 4
4. Put the following code in the Form's KeyPress:
LPARAMETERS nKeyCode, nShiftAltCtrl

DO CASE
	CASE nShiftAltCtrl= 2 AND ;
	     nKeyCode = 26 && CTRL LeftArrow
		NODEFAULT
		WITH thisform.pgfTest
			IF .ActivePage = 1
				.ActivePage = .PageCount
			ELSE
				.ActivePage = .ActivePage-1
			ENDIF
		ENDWITH
		RETURN
	CASE nShiftAltCtrl= 2 AND ;
	     nKeyCode = 2 && CTRL RightArrow
		NODEFAULT
		WITH thisform.pgfTest
			IF .ActivePage = .PageCount
				.ActivePage = 1
			ELSE
				.ActivePage = .ActivePage+1
			ENDIF
		ENDWITH
		RETURN
		
ENDCASE
>Here's another routine I'll probably have to write myself but I thought perhaps somebody's already done this one: Programmable key combo to switch pages on a multi-page form. When a keystoke combo is pressed the next page is activated, when another keystroke combo is pressed the previous page is activated and they would loop around on both ends.
>
>Thanks in Advance.
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform