If you want to emulate some of the functionality of the Kodak Image Edit control such as zooming and scrolling, here's a simple way using native FoxPro controls.
Select a form containing a FoxPro image control, note its .Left and .Top positions, right click on the control and select Cut.
Add a new form and Paste the image control into the new form at .Left = 0, .Top = 0.
The NON DEFAULT properties of the new form should be:-
WITH THISFORM
.AlwaysOnTop = .T.
.BorderStyle = 0
.ScrollBars = 3
.TitleBar = 0
.Left = && Image control .left in original form
.Top = && Image control .top in original form
.Height = && Image control .height
.Width = && Image control .width
ENDIF
In the load event put:-
THIS.Width = && Image control width
*--You will find the form will progressively reduce otherwise.
Save the form.
In the original form's Load event put:-
DO FORM newform NAME oGraphic NOSHOW
Add a spinner control, .spnZoom, with .KeyboardLowValue and .SpinnerLowValue = 100.
WITH oGraphic
.imgGraphic.Picture = && Filename
.Show()
ENDWITH
You will probably need to use a Timer to ensure oGraphic does not appear before the form instantiates, to adjust the final position of oGraphic, and ensure oGraphic is released in the Form's Destroy event
You now have, (or appear to have), a zoomable, scrollable Image control.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.