Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Supressing decimals on forms in VFP9
Message
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01166617
Message ID:
01167127
Views:
11
Hi Wayne,

I put together a simple test form, according to your description of the problem, and I donyt see it. The integers shows properly. Can you modify the code to repro the problem?
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form
	DoCreate = .T.
	Caption = "Test Form"
	Name = "Form1"

	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "test.i1", ;
		Height = 23, ;
		Left = 65, ;
		Top = 72, ;
		Width = 100, ;
		Name = "Text1"


	ADD OBJECT text2 AS textbox WITH ;
		ControlSource = "test.i2", ;
		Height = 23, ;
		InputMask = "9", ;
		Left = 209, ;
		Top = 73, ;
		Width = 100, ;
		Name = "Text2"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 156, ;
		Left = 73, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Prev", ;
		Name = "Command1"


	ADD OBJECT command2 AS commandbutton WITH ;
		Top = 156, ;
		Left = 217, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Next", ;
		Name = "Command2"


	PROCEDURE Load
		CREATE CURSOR test (i1 int, i2 int)
		INSERT INTO test VALUES (0,0)
		INSERT INTO test VALUES (1,0)
		INSERT INTO test VALUES (0,1)
		INSERT INTO test VALUES (1,1)
		GO TOP
	ENDPROC


	PROCEDURE command1.Click
		IF NOT BOF()
			SKIP -1 IN Test
			Thisform.Refresh()
		ENDIF
	ENDPROC


	PROCEDURE command2.Click
		IF NOT EOF()
			SKIP 1 IN Test
			Thisform.Refresh()
		ENDIF
	ENDPROC


ENDDEFINE
>I converted a program from VP7 to VFP 9 and all of sudden fields with integer values defined in the table with no decimal places and with an input mask of "9" display as 0.00. I recompiled the program back into VFP 7 and it displays as 0.
>
>Help...
>
>If I use set decimals to 0, would not it affect the fields I do want to show decimals for?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform