Author | 
 Topic: Rendering webpages within BB4W application  (Read 854 times) | 
 
 
 | 
 
 
jeroengroenendaal
 New Member
 
  member is offline
  
 
  
    
    
 Gender:   
Posts: 7 
 | 
  | 
Rendering webpages within BB4W application 
« Thread started on: Feb 2nd, 2015, 2:37pm » | 
 | 
 
 
 
Hello,
  I am looking for a simply method to render web pages within the BB4W application. I have tested a bit with the COM programming library, but that opens Internet Explorer in an external window.
  Is this easily possible?
  Many thanks for any help! Jeroen Groenendaal 
 | 
 
 | 
  Logged
 | 
               
             
            
             
             | 
           
         
         | 
       
     
     | 
   
 
rtr2
 Guest 
 | 
  | 
Re: Rendering webpages within BB4W application 
« Reply #1 on: Feb 2nd, 2015, 3:28pm » | 
 | 
 
 
 
on Feb 2nd, 2015, 2:37pm, jeroengroenendaal  wrote:| I am looking for a simply method to render web pages within the BB4W application.  |  
  |  
  You can easily do it with an ATL control:
   Code:      INSTALL @lib$+"WINLIB5"
      SYS "LoadLibrary", "ATL.DLL" TO atl%
      SYS "GetProcAddress", atl%, "AtlAxWinInit" TO `AtlAxWinInit`
      SYS `AtlAxWinInit`
      ON CLOSE PROCcleanup : QUIT
      ON ERROR SYS "MessageBox", @hwnd%, REPORT$, 0, 0 : PROCcleanup : QUIT
      *ESC OFF
      url$ = "http://www.rtrussell.co.uk/"
      DIM rc{l%,t%,r%,b%}
      SYS "GetClientRect", @hwnd%, rc{}
      hATL% = FN_createwindow("AtlAxWin", url$, 0, 0, rc.r%, rc.b%, 0, &200000, 0)
      REPEAT
        WAIT 0
      UNTIL FALSE
      END
      DEF PROCcleanup
      hATL% += 0 : IF hATL% PROC_closewindow(hATL%) : hATL% = 0
      ENDPROC  Richard. 
 | 
 
| « Last Edit: Feb 2nd, 2015, 3:33pm by rtr2 » | 
  Logged
 | 
               
             
            
             
             | 
           
         
         | 
       
     
     | 
   
 
jeroengroenendaal
 New Member
 
  member is offline
  
 
  
    
    
 Gender:   
Posts: 7 
 | 
  | 
Re: Rendering webpages within BB4W application 
« Reply #2 on: Feb 3rd, 2015, 06:18am » | 
 | 
 
 
 
Many thanks, Richard! This works perfectly for my application I had in mind.
 | 
 
 | 
  Logged
 | 
               
             
            
             
             | 
           
         
         | 
       
     
     | 
   
 
jeroengroenendaal
 New Member
 
  member is offline
  
 
  
    
    
 Gender:   
Posts: 7 
 | 
  | 
Re: Rendering webpages within BB4W application 
« Reply #3 on: Feb 4th, 2015, 09:07am » | 
 | 
 
 
 
I had some difficulties reneding some parts of my website on one of my Terminal Servers.
  I have tested the output to : https://www.whatismybrowser.com/
  This results that all webpages rendered in my own application probably uses the 'compatability mode' and blocks some Javascript :
 
  
  So, if you use this solution, please bare in my it isn't the same experience as in your browser. (e.g. the page rendering can be different as well) 
 | 
 
 | 
  Logged
 | 
               
             
            
             
             | 
           
         
         | 
       
     
     | 
   
 
rtr2
 Guest 
 | 
  | 
Re: Rendering webpages within BB4W application 
« Reply #4 on: Feb 6th, 2015, 5:15pm » | 
 | 
 
 
 
on Feb 4th, 2015, 09:07am, jeroengroenendaal  wrote:| So, if you use this solution, please bare in my it isn't the same experience as in your browser.  |  
  |  
  Here (Windows 8.1, Internet Explorer 11, BB4W 6.00a), http://www.whatismybrowser.com/ reports basically identical information from the ATL control and from Internet Explorer.  The only significant differences are that the ATL control is reporting Internet Explorer 7 Compatibility View and the true screen resolution (1920 x 1080) - because I have set BB4W as 'DPI aware' - whereas IE is reporting a 'scaled' 96 DPI resolution (1280 x 720).
  I am not seeing any difference in respect of JavaScript:
 
  
  Richard.
 | 
 
| « Last Edit: Feb 6th, 2015, 5:20pm by rtr2 » | 
  Logged
 | 
               
             
            
             
             | 
           
         
         | 
       
     
     | 
   
 
jeroengroenendaal
 New Member
 
  member is offline
  
 
  
    
    
 Gender:   
Posts: 7 
 | 
  | 
Re: Rendering webpages within BB4W application 
« Reply #5 on: Feb 6th, 2015, 5:27pm » | 
 | 
 
 
 
Richard,
  Yes, in Internet Explorer 11 the website does work. However, we still have a Terminal Server running Windows Server 2003 with the latest supported Internet Explorer Browser 8.0 installed. This version does give Javascript errors using this web page.
  I know, we should replace that old server. But it's a low-budget company  
  Maybe this is a good reason the swap all Terminal users to the new environment.
  However, the intranet/extranet webpage that I am going to use, does give Javascript error even in Windows 8.1. I will not give the adres to this forum, through.
  Best regards, Jeroen 
 | 
 
 | 
  Logged
 | 
               
             
            
             
             | 
           
         
         | 
       
     
     | 
   
 
 
 |