Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SHDocVw.WebBrowser elements
#1
Is possible to view in SHDocVw.WebBrowser only desired elements of web page.

ex.

http://revisor.com.ar/


Attached Files Image(s)
   
#2
Difficult.

Method A.
Download to variable (IntGetFile).
Remove part (replacerx).
Load into control (HtmlToWebBrowserControl).
But it can work only with some simple pages, because most need external files, and we cannot set relative url.

Method B.
Load normally (directly from url to control).
Remove part using MSHTML functions.
#3
Can you show the example in this case?
#4
No, too much work.
#5
In this code how can i scroll the control?

Function correctorweb
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str ax3SHD
ax3SHD=""
if(!ShowDialog("correctorweb" &correctorweb &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 420 290 "Correctorweb"
;3 ActiveX 0x54030000 0x0 0 0 419 289 "SHDocVw.WebBrowser"
;END DIALOG
;DIALOG EDITOR: "" 0x2030208 "*" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,SHDocVw.WebBrowser we3
,we3._getcontrol(id(3 hDlg))
,we3.Navigate("http://revisor.com.ar/")
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#6
Function correctorweb
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str ax3SHD
ax3SHD=""
if(!ShowDialog("correctorweb" &correctorweb &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 420 290 "Correctorweb"
;3 ActiveX 0x54030000 0x0 0 0 419 289 "SHDocVw.WebBrowser"
;END DIALOG
;DIALOG EDITOR: "" 0x2030208 "*" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,SHDocVw.WebBrowser we3
,we3._getcontrol(id(3 hDlg))
,we3.Navigate("http://revisor.com.ar/")
,opt waitmsg 1
,;rep() 0.1; if(!we3.Busy) break ;;wait until loaded. Here don't need because htm can wait.
,Htm el=htm("TEXTAREA" "ta" "" hDlg 0 0 0x121 60)
,el.Scroll
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#7
Thanks.


Forum Jump:


Users browsing this thread: 1 Guest(s)