Opening A Website

Xbase++ 2.0 Build 554 or later
Message
Author
clp1000
Posts: 14
Joined: Wed Jan 04, 2023 2:18 am

Opening A Website

#1 Post by clp1000 »

Hello

In the past, we've used this to open a webpage :
CreateObject( "InternetExplorer.Application" )

Is there a way of changing Explorer to Edge so this can be opened externally ?
Thanks
Chris

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Opening A Website

#2 Post by Tom »

Since last year, Alaska delivers the "XbpHtmlViewer2"-asset with Xbase++ 2.0, which is a wrapper to the Microsoft WebView2 control, which is the base of Edge. This is a state-of-the-art-control to show any kind of HTML with all stuff needed in there. Just add the asset to your project and navigate to any website with the navigate method.

If you use the DCHTMLVIEWER, you just need to add the asset to the DCLIPX_20-project and change any call of "XbpHtmlViewer" to call "XbpHtmlViewer2" there. This is what I did. Works perfect. We needed that since all the GoogleMaps-APIs didn't support IE anymore. XbpHtmlViewer2 is also much faster, supports JS, CSS and whatever you want.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Opening A Website

#3 Post by rdonnay »

If you use the DCHTMLVIEWER, you just need to add the asset to the DCLIPX_20-project and change any call of "XbpHtmlViewer" to call "XbpHtmlViewer2" there.
I didn't know about this.
I will make this change in eXpress++
The eXpress train is coming - and it has more cars.

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Opening A Website

#4 Post by skiman »

Hi Roger,

Is this already available or is this on your todo list?
Best regards,

Chris.
www.aboservice.be

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Opening A Website

#5 Post by Tom »

Is this already available or is this on your todo list?
Just add the XbpHtmlViewer2-asset to the project "DCLIPX_20.XPJ" and replace any call to XbpHtmlViewer with XbpHtmlViewer2 in the DCLIPX-sourcefiles. Rebuild everything. That's it.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Opening A Website

#6 Post by skiman »

Hi Roger,

Don't bother.

There is a difference in the xbphtmlviewer and xbphtmlviewer2 which makes it useless for me. I'm using the htmlviewer to view PDF files and to copy content from it. In the old version you can double click on a word and drag it immediately. In the htmlviewer2 this isn't working anymore. So this is a show stopper for me.

I already noticed this about a year ago and was hoping with the latest update it would work.
Best regards,

Chris.
www.aboservice.be

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Opening A Website

#7 Post by Auge_Ohr »

hi,

it is IMHO not a Problem of EDGE itself, it is while EDGE internal PDF Viewer does support OLE Drag_Source
Xbase++ App can not receive OLE Drop as Drop_Target, only CF_TEXT or CF_BITMAP work with DragAccept()

---

there is are Tools, like xPDFreader, to extract TEXT from PDF
https://www.xpdfreader.com/download.html
greetings by OHR
Jimmy

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Opening A Website

#8 Post by Tom »

This is not what Chris is talking about. With the IE control, you can double-click on a text (a word) and just move it (in order to drag it and drop it elsewhere). With the edge control, you can double-click and the word gets marked, but if you try to grab it (in order to drag and drop), the marked zone vanishes - the marking process restarts. The behaviour is different. Maybe there is a good hidden registry setting to change this behaviour, but it seems to be hard to find.

Besides this, the webview2 control is lightyears away from the IE control.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Opening A Website

#9 Post by skiman »

Hi Tom,

Yes, that's exactly the problem.
Best regards,

Chris.
www.aboservice.be

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Opening A Website

#10 Post by Auge_Ohr »

hi,

i can not confirm that Dblckick does not mark Word for Dragdrop in Webviev2 in my Sample (HMG, Fivewin)
Webview2_DD.gif
Webview2_DD.gif (107.22 KiB) Viewed 1940 times
Webview2 Control must be register as Drag_Source else it will not mark/Dragdrop

---

@Chris : you can use SumatraPDF Viewer without Browser and mark/Dragdrop as CF_TEXT
p.s. can be control via DLL Call from App
greetings by OHR
Jimmy

Post Reply