Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Image sizing behavior in webbrowser?
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01242738
Message ID:
01242966
Views:
15
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform