Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to see image full size?
Message
From
19/07/2011 01:13:49
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01518483
Message ID:
01518484
Views:
87
This message has been marked as a message which has helped to the initial question of the thread.
Hi Naomi, Would you try this?
( untested !!! )
*!* zoom to X% using MouseWheel
*!*thisform.imgPicture.MouseWheel
LPARAMETERS nDirection, nShift, nXCoord, nYCoord
LOCAL lnDeltaX, lnDeltaY
m.lnDeltaX = this.nWidthOrigin * 10 / 100
m.lnDeltaY = this.nHeightOrigin * 10 / 100
IF m.nDirection < 0
  this.Width = this.Width + m.lnDeltaX
  this.Height = this.Height + m.lnDeltaY
ELSE
  this.Width = MAX(this.Width - m.lnDeltaX, m.lnDeltaX)
  this.Height = MAX(this.Height - m.lnDeltaY, m.lnDeltaY)
ENDIF


*!* zoom to 100%
*!*thisform.imgPicture.DblClick
this.Width = this.nWidthOrigin
this.Height = this.nHeightOrigin


*!* use this for assign PictureVal to imgPicture object
*!* LoadMyPicture Method
LPARAMETERS tcPictureContent
LOCAL lcFile, loImage
m.lcFile = ADDBS(SYS(2023)) + SYS(2015)

*!* create image object for retrieve actual picture size
m.loImage = CREATEOBJECT("Image")
m.loImage.Picture = m.lcFile

*!* 100% picture size
WITH thisform.imgPicture
  .PictureVal = m.tcPictureContent
  .Width = m.loImage.Width
  .Height = m.loImage.Height
  .Stretch = 1
  .AddProperty("nWidthOrigin", .Width)
  .AddProperty("nHeightOrigin", .Height)
ENDWITH

m.loImage = NULL
RELEASE m.loImage
ERASE (m.lcFile)
Regards,
Ony
Regards,
Ony
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform