1. Alexander Skorokhodov
  2. PowerBuilder
  3. Thursday, 2 July 2020 06:11 AM UTC

Dear Appeon:

i need to access a web site from my PBL app.

i need to open this web site and forget about it, no return to my app.

i thought (naively) that a simple call similar to 

run(iexplore  https://www.google.com/)

would do it.

but nothing happens here, the above run exits with no action.

i am forced to use

w_web_browser.ole_1.object.Navigate(  'https://www.google.com'  )

i d like to avoid invoking w_web_browser, and run iexplore directly from my PBL app.

is there a way to do so?

thank you for help

sasha

 

 

 

Marco Meoni Accepted Answer Pending Moderation
  1. Thursday, 2 July 2020 07:12 AM UTC
  2. PowerBuilder
  3. # 1

Hi Alexander,

Run("c:\program files\Internet Explorer\iexplore.exe https://www.google.com")

Btw, Run&wait is a better solution than Run:

https://www.rgagnon.com/pbdetails/pb-0151.html

Best,

.m

Comment
  1. René Ullrich
  2. Thursday, 2 July 2020 07:30 AM UTC
BTW, using the approach with WScript.Shell (https://www.rgagnon.com/pbdetails/pb-0151.html) you can also simply run "https://www.google.com"; to opoen the URL with the default browser.
  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 2 July 2020 07:31 AM UTC
  2. PowerBuilder
  3. # 2

How about the Inet service with function HyperlinkToURL? It uses the default browser.

Inet linet_base
GetContextService("Internet", linet_base)
linet_base.HyperlinkToURL("https://www.google.com")

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 2 July 2020 12:05 PM UTC
  2. PowerBuilder
  3. # 3

Hi Alexander;

 If you upgrade to PB 2019 R2, it now has a built in Web Browser control for just this type of App functionality.

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 2 July 2020 19:30 PM UTC
Hi Sasha;

No, in PB2019R2 you have a "built-in" (native) Web Browser control. Thus, no external or OLE control is any longer required for web access.

Regards ... Chris

Regards .... Chris
  1. Helpful
  1. Govinda Lopez @Appeon
  2. Thursday, 2 July 2020 19:37 PM UTC
Alexanxer,



You might want to take a look into this link: https://docs.appeon.com/pb2019r2/whats_new/ch01s05.html





Regards,
  1. Helpful
  1. Alexander Skorokhodov
  2. Friday, 3 July 2020 04:31 AM UTC
Gentlemen:

Thank you very much

Gracias muchas

for you input, I ll stop playing with PBL 2017 with regards to this issue.

sasha

  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 2 July 2020 12:20 PM UTC
  2. PowerBuilder
  3. # 4

Hi

Declare this external API function:

Function long ShellExecute( long hwnd,  string lpOperation, string lpFile, string lpParameters,  string lpDirectory,  integer nShowCmd) Library "shell32.dll" alias for "ShellExecuteW" 

 

Then if this is for example in the clicked of a button on top of a window (hence "handle(parent)":

string ls_null

setnull(ls_null)
ll_handle = Handle(Parent)// setnull(ll_handle)  might also work

// last parameter: 1=Normal (last used winState), 3=maximized
ShellExecute( ll_handle, 'Open', "https://www.google.com", ls_null, "default directory", 1) 

This would open up a browser which is assigned in windows as default browser and your powerbuilder code keeps running.

With "default directory" I mean an existing default directory on your computer, so you have to replace that.

 regards

Comment
There are no comments made yet.
Marcelo Gil Accepted Answer Pending Moderation
  1. Tuesday, 14 July 2020 18:49 PM UTC
  2. PowerBuilder
  3. # 5

Hi Chris! thank you for your comments.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.