Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scrollable Image
Message
 
À
14/12/2005 12:45:39
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01077935
Message ID:
01078410
Vues:
17
>I am trying to display an image on a form. I am doing this by planting an olebound control on the form and linking it to general field that contains the image.
>
>My problem is that the image is tall and narrow (its a bottle label) and only half of the image will fit onto the form. If I compress the image, I lose clarity.
>
>Is there some way of displaying an image on a form in a scrollable format (like a web page) so it can be viewed with scroll buttons.
>
>I did investigate the hyperlink image but it is so poorly documented and the component gallery is so difficult to navigate, that I could not even get started.
>
>Thanks.
>
>Mike Smith
Try this
* UT_FIMG.PRG
* Add a really long image to a long container in a VFP
* Form
PUBLIC myform as Form
myForm=CREATEOBJECT('theform')
myform.Show
* The form presents

DEFINE CLASS theImageContainer as Container
top=0
left=0
backcolor=RGB(255,255,255)
height=1500
* You may want to match this width with your image width
width=300
visible=.t.
ADD OBJECT theImage as Image
theImage.top=10
theImage.left=10
theImage.stretch=2
theImage.height=1000
theImage.width=280
* Put your tall image here
theImage.picture="d:\r6solutionstmp\r6_dock\imx\shipping.ico"
theImage.visible=.t.
ENDDEFINE &&CLASS cntImage as Container

DEFINE CLASS theform as Form 
autocenter=.t.
visible=.t.
caption=[Tall Image In a Form]
height=300
width=300
scrollbars=2
ADD OBJECT cntImage as theImageContainer
ENDDEFINE &&CLASS theform as Form
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform