Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Genscrn.prg modifications
Message
From
02/04/2003 17:22:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Genscrn.prg modifications
Miscellaneous
Thread ID:
00773305
Message ID:
00773305
Views:
56
I have code in the genscrn.prg that does some special effects when we build an app and compile our screens. I adjust the spacing between push buttons if the .spr is being run in VFP to .5 instead of 0 or 1. However, I need to dynamically adjust the size of the window and relocate it accordingly after I determine what the spacing of the push buttons should be. Has anyone already done this? Any idea? Below is the code I added for our adjustments on the push buttons that works correctly but afterwards the window is too small and needs to be adjusted:
*) GENPUSH - Generate Push buttons.
*)
*) Description:
*) Generate code to display push buttons exactly as they appear
*) in the painted screen(s).
*)
PRIVATE m.thepicture

m.thepicture = PICTURE
IF g_screens[m.g_screen, 7] = 'WINDOWS' OR g_screens[m.g_screen, 7] = 'MAC'
   SET DECIMALS TO 3
ENDIF
\@ <<Vpos>>,<<Hpos>> GET <<Name>> ;
DO anybitmapctrl WITH m.thepicture

*\	SIZE <<Height>>,<<Width>>,<<Spacing>> 
*\	SIZE <<m.g_userheight>>,<<m.g_userwidth>>,<<m.g_userspacing>> ;
*--TCH 04/02/2003
\ SIZE <<m.g_userheight>>,<<m.g_userwidth>>,<<m.g_userspacing>>;
+IIF('VISUAL'$UPPER(VERSION()).and.<<m.g_userspacing>>=0.and.OCCURS(';',<<m.thepicture>>)>=11,.5,;
IIF('VISUAL'$UPPER(VERSION()).and.<<m.g_userspacing>>=1.and.OCCURS(';',<<m.thepicture>>)>=11,-.5,0));

SET DECIMALS TO 0
\	DEFAULT <<Initialnum>>
DO anyfont
DO anystyle
DO anywhen
DO anyvalid
DO anydisabled
DO anymessage
DO anyerror
DO anyscheme
RETURN
.·*´¨)
.·`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"
Next
Reply
Map
View

Click here to load this message in the networking platform