Page 1 of 1
Opening a BMP with "Shell.Internet" question
Posted: Sun Aug 24, 2008 2:20 pm
by Patrick Mast
Hi,
Please consider this source:
Code: Select all
#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
Posted: Sun Aug 24, 2008 4:44 pm
by James Bott
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
Re: Opening a BMP with "Shell.Internet" question
Posted: Sun Aug 24, 2008 6:20 pm
by NK
Patrick Mast wrote:Hi,
oActiveX:Do( "Navigate2", "c:\test.bmp" )
[/code]
This always shows this dialog:
Test this
file:///C:/test.bmp
Regards, Norbert
Posted: Mon Aug 25, 2008 5:34 am
by Patrick Mast
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
#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
Posted: Mon Aug 25, 2008 2:45 pm
by James Bott
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