Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

view html

hi i want the most efficient way (cpu and file size) to view the html of a website.
0
FeVeR
Asked:
FeVeR
  • 2
1 Solution
 
bobbit31Commented:
this is one way, using microsoft internet controls (under project/components):

WebBrowser1.Navigate "http://www.hotmail.com"
While WebBrowser1.Busy
DoEvents
Wend
MsgBox WebBrowser1.Document.body.innerHtml

0
 
Ryan ChongCommented:
>>to view the html
Display source code or content? if is source code bobbit31's solution should works, or if you want to display it from browser you can try the ShellExecute API:

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOWNORMAL = 1

Private Sub Command1_Click()
    ShellExecute Me.hwnd, vbNullString, "http://www.yahoo.com", vbNullString, vbNullString, SW_SHOWNORMAL
End Sub
0
 
Ryan ChongCommented:
Opps, :)
0
 
FeVeRAuthor Commented:
thanks, that looks great too!
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now