Opening a BMP with "Shell.Internet" question

Opening a BMP with "Shell.Internet" question

Postby Patrick Mast » Sun Aug 24, 2008 2:20 pm

Hi,

Please consider this source:
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

FUNCTION Main()

   LOCAL oWnd, oActiveX

   DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"

   oActiveX = TActiveX():New( oWnd, "Shell.Explorer" )
   oWnd:oClient = oActiveX
   
   oActiveX:Do( "Navigate2", "c:\test.bmp" )

   ACTIVATE WINDOW oWnd

RETURN nil

This always shows this dialog:
Image
How can I prevent this "Open" dialog box and just show the image in the Shell.Explorer activeX?

Thanks!

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby James Bott » Sun Aug 24, 2008 4:44 pm

Patrick,

I don't think you can get rid of the warning dialog without the user resetting their security settings in IE.

How about writing a temp HTML file with a link to the graphic?

Or, can't you just display the graphic in a FWH window?

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Opening a BMP with "Shell.Internet" question

Postby NK » Sun Aug 24, 2008 6:20 pm

Patrick Mast wrote:Hi,
oActiveX:Do( "Navigate2", "c:\test.bmp" )
[/code]
This always shows this dialog:


Test this

file:///C:/test.bmp

Regards, Norbert
User avatar
NK
 
Posts: 97
Joined: Sun Nov 20, 2005 4:32 pm
Location: Germany

Postby Patrick Mast » Mon Aug 25, 2008 5:34 am

Hey James,

James Bott wrote:I don't think you can get rid of the warning dialog without the user resetting their security settings in IE.
How about writing a temp HTML file with a link to the graphic?

Yes, that's what I did after posting the question. :)

Code: Select all  Expand view  RUN
#include "FiveWin.ch"

FUNCTION Main()

   LOCAL oWnd, oActiveX, cImage:="c:\test.bmp"

   DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"

   oActiveX = TActiveX():New( oWnd, "Shell.Explorer" )
   oWnd:oClient = oActiveX
   
   MemoWrit("c:\temp.html",'<html><img src="'+cImage+'" /></html>')
   
   oActiveX:Do( "Navigate2", "c:\temp.html" )

   ACTIVATE WINDOW oWnd

RETURN nil

But I thought that maybe we could set a propertie or something else in the ActiveX control to disable that dialog box. It would be simpler than creating a temp HTML.

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby James Bott » Mon Aug 25, 2008 2:45 pm

Patrick,

>But I thought that maybe we could set a propertie or something else in the ActiveX control to disable that dialog box. It would be simpler than creating a temp HTML.

That would be simpler, but if Microsoft allowed that, anyone could disable the security warning. I'm not sure what threat there is in dispalying a bitmap, however. Perhaps there is no type checking in their warning system.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 83 guests