Page 1 of 1
problem with ActiveX navigate
Posted: Tue Nov 09, 2021 11:10 am
by fouednoomen
Hi all Friands.
I have this message when open url on my hmg application
Re: problem with ActiveX navigate
Posted: Tue Nov 09, 2021 12:09 pm
by edk
Hmm, I installed the "Crystal ball of seer" app on my phone, looked through it at your screenshot, and damn, the ball didn't show me the source code, I think this app is broken ....
So I took tarot cards, unfolded the deck and guessing there might be a solution:
https://weblog.west-wind.com/posts/2011 ... ie-version
Re: problem with ActiveX navigate
Posted: Tue Nov 09, 2021 3:50 pm
by fouednoomen
Procedure Http()
cAddress := Alltrim(ARTICLE->LIEN_HTTP)
If len(Alltrim(ARTICLE->LIEN_HTTP)) >0
DEFINE WINDOW Win_http ;
AT 95,0 ;
WIDTH 1024 ;
HEIGHT 620 ;
ICON 'Solex.ICO' ;
MODAL
@ 0,0 ACTIVEX Test ;
WIDTH 1000 ;
HEIGHT 580 ;
PROGID "shell.explorer.2"
Win_http.Test.Object:Navigate(cAddress)
END WINDOW
ACTIVATE WINDOW Win_http
endif
Return
Re: problem with ActiveX navigate
Posted: Tue Nov 09, 2021 5:21 pm
by edk
Be so kind and tell us what the value of the ARTICLE-> LIEN_HTTP field is, which is bothering you.
Re: problem with ActiveX navigate
Posted: Wed Nov 10, 2021 8:11 am
by fouednoomen
Hi Edk
Find below the value of the ARTICLE-> LIEN_HTTP field
https://www.piecesauto.com/fr/recherche ... 1878085741
Best regards
Re: problem with ActiveX navigate
Posted: Wed Nov 10, 2021 9:10 am
by AUGE_OHR
hi,
when i disable Java-Script i can not access Website of your Link.
but "shell.explorer.2" , using old IE -Engine, does not work with Java-Script so you get Error Message
i´m not a Internet Guru but i think other User can tell you how to "Download" Website ( CURL ? )
Re: problem with ActiveX navigate
Posted: Wed Nov 10, 2021 10:20 am
by edk
So my tarot cards were right.
The page you are trying to display is not entirely compatible with IE.
"Shell.Explorer.2" creates a IE 7.0 embedded browser by default.
You should change the emulation to IE11. However, despite this, the page will not be displayed completely properly. You can check this by launching IE Browser on your computer and entering the address of the problematic website, then do the same in Edge Browser - you will see the differences.
Below code to change IE emulation and disabling error messages:
PS. I am still wondering, while browsing your code, would it be better to open link in the default browser instead of browsing the it in the modal window?
Or
https://hmgforum.com/viewtopic.php?p=67093#p67093
Code: Select all
#include "hmg.ch"
Function Main()
Local cExeName := hb_FNameNameExt(hb_ProgName())
Local cRegPath := "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION\" + cExeName
//check registry
IF RegistryRead( cRegPath ) = NIL
/* Browser Emulation
Windows Internet Explorer 8 and later. The FEATURE_BROWSER_EMULATION feature defines the default
emulation mode for Internet Explorer and supports the following values.
Value Description
11001 Internet Explorer 11. Webpages are displayed in IE11 edge mode. */
RegistryWrite( cRegPath, 11001 )
ENDIF
DEFINE WINDOW Win_1 AT 0 ,0 WIDTH GetDesktopRealWidth() HEIGHT GetDesktopRealHeight() TITLE "IE 11 Compatible mode" MAIN
@ 20,20 TEXTBOX t_url ;
WIDTH 500 ;
VALUE "https://www.piecesauto.com/fr/recherche/1.html?reference=1878085741" ;
@ 20, 550 BUTTON Button_1 ;
CAPTION "Go ActiveX" ;
ACTION Win_1.Activex_1.Object:Navigate ( AllTrim( Win_1.t_Url.Value ) ) ;
WIDTH 150 HEIGHT 25
@ 20, 720 BUTTON Button_2 ;
CAPTION "Open in Browser" ;
ACTION ShellExecute ( NIL, "Open", AllTrim( Win_1.t_Url.Value ) , NIL, NIL, SW_SHOWNORMAL );
WIDTH 150 HEIGHT 25
DEFINE ACTIVEX Activex_1
ROW 50
COL 20
WIDTH Win_1.Width - 50
HEIGHT Win_1.Height - 100
PROGID "shell.explorer.2"
END ACTIVEX
Win_1.Activex_1.Object:Silent := 1
END WINDOW
ACTIVATE WINDOW Win_1
Return Nil
Re: problem with ActiveX navigate
Posted: Wed Nov 10, 2021 3:16 pm
by fouednoomen
Many thanks Edk
it's run perfectly
regards
foued
Re: problem with ActiveX navigate
Posted: Wed Nov 10, 2021 9:41 pm
by Claudio Ricardo
Para solventar el inconveniente del obsoleto IE, el Dr. Claudio Soto compartió aqui hace un par de
meses una solución que aprovecha el motor de Edge... es facil de implementar y funciona perfecto.
To solve the problem of the obsolete IE, Dr. Claudio Soto shared here a couple of months ago a
solution that takes advantage of the Edge engine ... is easy to implement and works perfect.
hmg_webview2_version03 =
https://www.hmgforum.com/viewtopic.php? ... e&start=20