Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_screen object
Message
 
À
10/01/2000 17:01:45
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00315788
Message ID:
00315791
Vues:
19
Try this:

lparameters plcGraphicFile
local loParent

loParent = _Screen

IF type("loParent.ioWallPaper.BaseClass") = "C"
loParent.RemoveObject("ioWallPaper")
ENDIF

loParent.AddObject("ioWallpaper","image")


IF type("loParent.ioWallPaper.BaseClass") = "C"
local lnTop, lnLeft

WITH loParent.ioWallPaper
.Top = -2000
.Left = -2000
.Picture = plcGraphicFile

* If the wallpaper object is larger than the working size of the loParent (due to
* a large .BMP or maybe a wallpaper .BMP created for a 1024x768 screen resolution
* but now running in 640x480 mode, etc.), shrink the wallpaper file to fit proportionally
IF .Height > loParent.Height OR .Width > loParent.Width
lnTop = 0
lnLeft = 0
.Top = -2000
.Left = -2000
.Height = loParent.Height
.Width = loParent.Width
.Stretch = 1
ELSE
* The wallpaper object is <= the overall _Screen dimensions, just center it
lnTop = (loParent.Height-.Height)/2
lnLeft = (loParent.Width-.Width)/2
.Top = -2000
.Left = -2000
ENDIF

.Visible = .T.
.Top = lnTop
.Left = lnLeft

ENDWITH
ENDIF

>I need to center an image on the _screen object for my application. I set the picture property of the screen object to the image I want displayed, but the image is tiled not centered. How do I center the picture?
>
>Thanks
>
>Jim
ICQ 10556 (ya), 254117
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform