Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating pictures (images) with Zoom
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00168484
Message ID:
00168747
Vues:
25
>1. Has anyone have any experience in creating a form with an image of a picture (e.g. roadmap) and making it so that when a user clicks on a predifend area (like a hot-spot) the bitmap is clip and zoomed into that area (without loading a second bitmap which as been zoomed by using a btimap editor).
>
>2. Can someone point into a direction were I can find an .OCX for showing Geo. Info.


Fox can do it:
**************************************************
*-- Class:        zoomimage 
*-- ParentClass:  image
*-- BaseClass:    image
*
DEFINE CLASS zoomimage AS image


	Stretch = 0
	Height = 68
	Width = 68
	zoomfactor = 1
	Name = "zoomimage"
	PROTECTED picture

	PROCEDURE loadimage
		LPARAMETERS ImageFileName

		IF EMPTY(ImageFileName)
			return
		ENDIF
		IF FILE(ImageFileName)
			ThisForm.LockScreen=.T.
			This.Stretch=0
			This.Picture=ImageFileName
			This.Top=This.Top
			This.ZoomFactor=1
			ThisForm.LockScreen=.F.
		ENDIF
	ENDPROC

	PROCEDURE RightClick
             ***zoom out
		IF This.ZoomFactor > 0.125
			Thisform.LockScreen=.t.
			This.ZoomFactor=This.ZoomFactor/2
			This.Stretch=2
			This.Width=This.Width/2
			This.Height=This.Height/2
			Thisform.LockScreen=.f.
		endif
	ENDPROC

	PROCEDURE Click
            ****zoom in
		IF This.ZoomFactor < 16
			Thisform.LockScreen=.t.
			This.ZoomFactor=This.ZoomFactor*2
			This.Stretch=2
			This.Width=This.Width*2
			This.Height=This.Height*2
			Thisform.LockScreen=.f.
		endif
	ENDPROC
ENDDEFINE
*
*-- EndDefine: zoomimage
**************************************************
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform