| Home | Previous Lesson: Course 3:: Session 29 :: Page 190 Next Lesson: Course 3:: Session 29 :: Page 210 |
In the previous section, we are using ActiveX automation server to display the HTML page. What if you want to deploy your app as a window plug-in or a stand along application, but, still want to display HTML page using the default browser set on the client machine? Well, you can do that too.
// Object: cb_html_in_default_browser CommandButton
// in w_context window
// Library: product_web.pbl
// Event: Clicked
Inet linet1
This.GetContextService( "Internet", linet1 )
linet1.HyperlinkToURL( "http://www.applied-software.com" )
This method is much easier than using ActiveX automation server. You can run this code in the native PowerBuilder runtime, window ActiveX or window Plug-in. However, this code (Inet object) is available on Windows 95 & Windows NT only. In the above example, we are using a new class called 'INet', introduced with PowerBuilder v6.0. Upon initialization, we are calling HyperlinkToURL()function with the URL name. As explained previously, this code works in a standalone PowerBuilder application also.
| Home | Previous Lesson: Course 3:: Session 29 :: Page 190 Next Lesson: Course 3:: Session 29 :: Page 210 |