FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Opening a BMP with "Shell.Internet" question
Posts: 246
Joined: Sat Mar 03, 2007 08:42 PM
Opening a BMP with "Shell.Internet" question
Posted: Sun Aug 24, 2008 02:20 PM
Hi,

Please consider this source:
#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:

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

Thanks!

Patrick
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Opening a BMP with "Shell.Internet" question
Posted: Sun Aug 24, 2008 04: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 97
Joined: Sun Nov 20, 2005 04:32 PM
Re: Opening a BMP with "Shell.Internet" question
Posted: Sun Aug 24, 2008 06: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
Posts: 246
Joined: Sat Mar 03, 2007 08:42 PM
Opening a BMP with "Shell.Internet" question
Posted: Mon Aug 25, 2008 05: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. :-)

#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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Opening a BMP with &quot;Shell.Internet&quot; question
Posted: Mon Aug 25, 2008 02: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion