Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Genscrn.prg modifications
Message
De
02/04/2003 17:22:18
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Genscrn.prg modifications
Divers
Thread ID:
00773305
Message ID:
00773305
Vues:
55
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"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform