Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Image sizing behavior in webbrowser?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01242738
Message ID:
01242966
Vues:
17
>Is it possible to do this with the webbrowser control?

You can do it with your own HTML/Javascript. Something like this:
cImage = GETPICT()

WITH ThisForm.oBrowser AS Shell.Explorer
   .Navigate("about:blank")
   DO WHILE .readyState < 4
      DOEVENTS
   ENDDO
   
   TEXT TO cHTML NOSHOW TEXTMERGE
<html>
<head>
<script language="javascript">
   function zoomimage(img)
   {
      if (img.style.width=='100%'){
         img.style.width='';
         document.body.scroll='';
      }else{
         img.style.width='100%';
         document.body.scroll='no';
      }
   }
</script>
<body style="margin:0px">
<img src="file:///<<cImage>>" style="width:100%;" onclick="zoomimage(this);">
</body></html>
   ENDTEXT
   
   .Document.write(cHTML)
   .Document.body.scroll="no"
   .Document.body.style.border="none"
ENDWITH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform