Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Menu screen
Message
De
23/06/2001 09:48:45
 
 
À
20/06/2001 01:42:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Titre:
Divers
Thread ID:
00521285
Message ID:
00522758
Vues:
11
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform