Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Vinay Pagaria
  Where is Vinay Pagaria?
 Kolkata
 India
 Vinay Pagaria
 Tags
Subject: RE: WebBrowser Control - Image Referencing
Thread ID: 112432 Message ID: 112516 # Views: 1 # Ratings: 1
Version: Visual FoxPro 6 Category: Active X Controls & OLE Automation
Date: Thursday, November 09, 2006 8:53:44 AM         
   


> > > > > > > Dear Experts,
> > > > > > > In a form I am using the Microsoft Web Browser Control for display of output to the end user.
> > > > > > >
> > > > > > > The HTML to be displayed is generated in code using data in my data tables and using certain images in some of the records.
> > > > > > >
> > > > > > > I have to keep everything (including data and images) packed inside the EXE as everything is static and to ensure security.
> > > > > > >
> > > > > > > I am facing problem with display of images in the Web Browser control.
> > > > > > > As i have included them in the EXE, VFP can read the image file with the relative path, but within the dynamically generated HTML, the web browser cannot reference the image.
> > > > > > >
> > > > > > > Is there any way out!!
> > > > > > >
> > > > > > > Regards,
> > > > > > > Vinay
> > > > > > > Cheers for Fox, Folks!
> > > > > > > My Blog: www.weblogs.foxite.com/vinaypagaria

> > > > > > At the time of execution copy the image files to the temporary folder and then delete the temp file after viewing
> > > > > >
> > > > > > Regards
> > > > > > Tushar

> > > > >
> > > > > Tushar,
> > > > >
> > > > > That would work, but it would be slow. If you were attempting to do this for a series of image files, it could take a fair amount of time.
> > > > >
> > > > > Ken
> > > > > You shall know the truth - and the truth shall set you free. (John 8:33)

> > > > Ken
> > > > If they are in the exe file, they may (hopefully) not be that large or numerous.
> > > >
> > > > Regards
> > > > Tushar

> > >
> > > Tushar,
> > >
> > > You would be AMAZED at what I have seen included in an EXE. I ran into one situation where the fellow had included 12 image files to be used as a background picture on his forms (like a wall paper for each month.) The images were over 100MB each! They wanted to know why it took so long to start the app! We reduced the size of the images somewhat and wonder of wonders? It worked faster. :)
> > >
> > > Hopefully, Vinay's images are somewhat smaller.
> > >
> > > Ken
> > > You shall know the truth - and the truth shall set you free. (John 8:33)

> > Well, Well ,Well. You learn something new each day.
> >
> > Regards
> > Tushar

>
>
> Ow No No, My entire EXE would not be that big!!
>
> They are small jpg/gif images. Actually I am making a Multiple Choice Question Bank and some questions have an image link (like a graph or diagram). Since the format of each question can be different hence i have gone the HTML way. And since its a "BANK" [no matter of what type :-) ], hence the EXE...
>
> Tushar, I was also planning to do the same, copy the images relevant to the said question to a temp folder and then in the HTML display the image. Only issue is that for each question I will need to keep a separate database of which images are to be copied, I Think it will be rather difficult to parse the full HTML and identify image names automatically.
>
> Another question here.... instead of creating my own temp folder, Is it possible to identify the SYSTEM TEMP folder path through any native VFP command (preferably) or API... My application has to work across diverse Windows versions. If Yes, can that be referred to in the HTML path also through some %tempfolder% kind of syntax??
>
> Thanks
> Vinay
> Cheers for Fox, Folks!
> My Blog: www.weblogs.foxite.com/vinaypagaria


Vinay,

You can get the temp dir with SYS(2023). It uses the Windows API GetTempPath, so it figures out the temp dir for that OS. Creating your own temp folder could be a bit of a problem. If you have a SysAdmin that is anything like mine, you will find that creating any directory in anything other than the users MyDocuments is not permitted. An app that attempted to add a c:\temp would not be allowed to.

While this is frustrating it also makes sense. You would be amazed at where a user can place a new directory, given the chance.

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

WebBrowser Control - Image Referencing Posted by Vinay Pagaria @ 11/8/2006 2:17:59 PM
RE: WebBrowser Control - Image Referencing Posted by Ken Murphy @ 11/8/2006 2:37:30 PM
RE: WebBrowser Control - Image Referencing Posted by tushar @ 11/8/2006 3:56:33 PM
RE: WebBrowser Control - Image Referencing Posted by Ken Murphy @ 11/8/2006 4:45:33 PM
RE: WebBrowser Control - Image Referencing Posted by tushar @ 11/8/2006 7:30:13 PM
RE: WebBrowser Control - Image Referencing Posted by Ken Murphy @ 11/8/2006 9:00:02 PM
RE: WebBrowser Control - Image Referencing Posted by tushar @ 11/9/2006 7:49:12 AM
RE: WebBrowser Control - Image Referencing Posted by Vinay Pagaria @ 11/9/2006 8:32:52 AM
RE: WebBrowser Control - Image Referencing Posted by Ken Murphy @ 11/9/2006 8:53:44 AM
RE: WebBrowser Control - Image Referencing Posted by tushar @ 11/9/2006 9:30:35 AM
RE: WebBrowser Control - Image Referencing Posted by Vinay Pagaria @ 11/9/2006 2:38:07 PM
RE: WebBrowser Control - Image Referencing Posted by Ken Murphy @ 11/9/2006 2:48:43 PM