Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Menu screen
Message
From
24/06/2001 09:29:07
 
 
To
23/06/2001 09:48:45
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Title:
Miscellaneous
Thread ID:
00521285
Message ID:
00522878
Views:
9
Mike,

What does the procedure oscr.resize do?

TIA

>>I have the background picture for the menu screen and I'm going to put my Company's logo and label onto the background.
>
>Try this little class that uses the screen.Resize tip from Fred Taylor
>
>
>* This class uses a little trick to give the _screen tappable events
>DEFINE CLASS logo AS image
>	oscr = _SCREEN
>
>	PROCEDURE Init
>		* Find a file for this object
>		lcFile = 'logo.bmp'
>		if not empty(lcFile)
>			this.Picture = lcFile
>		else
>			return .F.
>		endif
>		this.Position()
>	ENDPROC
>
>	PROCEDURE oscr.Resize
>		* This assumes the object was added to the screen as "oLogo"
>		this.oLogo.Position()
>	ENDPROC
>
>	PROCEDURE Position
>		* Position this image where it should be
>		with this
>			.Left = _screen.width / 2 - .width / 2
>			.Top = _screen.height / 2 - .Height / 2
>		endwith
>	ENDPROC
>
>ENDDEFINE
>Then, run this code:
>_screen.NewObject('oLogo', 'logo', 'screenimage.prg')
>_screen.oLogo.Visible = .T.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform