Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Differences when fox dox redone in fox6
Message
From
07/02/2002 15:58:11
 
 
To
07/02/2002 14:37:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00616909
Message ID:
00616995
Views:
16
Hi Sunshine,
I had a similar problem. The FPD26 app is running in VFP7. The screens are drawn using prgs (some are .sprs) and I need to clear the read for each page (screen) when the user presses pgdown, etc. All of the .prgs or .sprs are stored in an array and then we run this code. Here is my code, maybe it will give you some ideas:
*--Main program that runs the screens
DIMENSION pagename(7,2)
pagename(1,1) = "a75-s1.spr"
pagename(2,1) = "a75-s2.spr"
pagename(3,1) = "a75-s3.spr"
pagename(4,1) = "a75-s4.spr"
pagename(5,1) = "a75-s5.spr"
pagename(6,1) = "a75-s6.spr"
pagename(7,1) = "a75-s7.spr"

mchoice = "U"
crntpage = 1

DO WHILE .T.
	DO CASE
	CASE mchoice = "U" OR mchoice = CHR(13)
		DO editpage
        ENDCASE
ENDDO
RETURN
*--Editpage Program
EXTERNAL ARRAY pagename

PRIVATE mlastkey, numpages, crntcursor

*---Check number of page(s)

numpages = ALEN(pagename,1)

IF NOT BETWEEN(crntpage,1,numpages)
	crntpage = 1
ENDIF

crntcursor = SET("CURSOR")
SET CURSOR ON

CLEAR

DO WHILE .T.
	IF TYPE("pagename(crntpage,1)") = "C" AND NOT EMPTY(pagename(crntpage,1))
		CLEAR TYPEAHEAD

		#IF 'VISUAL' $ UPPER(VERSION())
			ON KEY LABEL PGUP CLEAR READ
			ON KEY LABEL PGDN CLEAR READ
		#ENDIF
		
		*---Do Screens
		DO (pagename(crntpage,1))

		#IF 'VISUAL' $ UPPER(VERSION())
			ON KEY LABEL PGUP
			ON KEY LABEL PGDN
		#ENDIF
		
		*---Get key used to exit screen
		mlastkey = LASTKEY()
		
		pagename(crntpage,2) = .T.
	ELSE
		pagename(crntpage,2) = .F.
		EXIT
	ENDIF
	
	DO CASE
	CASE mlastkey = -9    &&  [F10]
		EXIT
	CASE mlastkey = 27    &&  [Esc]
		EXIT
	CASE mlastkey = 18 OR mlastkey = 5 OR mlastkey = 19 OR mlastkey = 31
		*---[PageUp]  [Uparrow]  [Leftarrow] [Ctrl-PageUp]
		
		crntpage = crntpage - 1
		IF crntpage < 1
			crntpage = numpages
		ENDIF
	CASE mlastkey = 29 && Ctrl_Home
		crntpage = 1
	CASE mlastkey = 23 && Ctrl_End
		crntpage = numpages
	OTHERWISE
		*---[PageDown]   [Downarrow]  [Rightarrow]  [Enter] [Ctrl-PageDown]
		
		crntpage = crntpage + 1
		IF crntpage > numpages
			crntpage = 1
		ENDIF
	ENDCASE
ENDDO
>I am currently working on a system that originated from fox dos. The system is used for data entry. Now, in fox6, the user complains that she has to hit the enter button then page down to get to the next screen. In the old system, all she had to do was hit the page down button to save and continue. Is there some way to allow her to hit only one button again? The application is made up of says,text endtext, and gets. I really appreciate your help.
>
>Sunshine
.·*´¨)
.·`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
Reply
Map
View

Click here to load this message in the networking platform