VB Implementation of simple IE browser

Source: Internet
Author: User

'Add a webbrowse control and several buttons with a small amount of code to implement a simple IE browser (the program running interface has been uploaded to the album VB6)

 

Private sub commandateclick (index as integer)
Select case index
Case 0
TRIP: webbrowser1.stop' stop
Case 1
Webbrowser1.refresh
Case 2
Webbrowser1.gohome Homepage
Case 3
On Error goto trip 'when an error occurs, the program jumps to the trip ID
Webbrowser1.goback back
Case 4
On Error goto trip
Webbrowser1.goforward
End select
End sub

Private sub form_load ()
Webbrowser1.gohome
End sub

Private sub text=keypress (keyascii as integer)
If keyascii = 13 then', when the URL is entered, press Enter.
Webbrowser1.navigate (text1)
End if
End sub

Private sub webbrowsersponbeforenavigate2 (byval Pdisp as object, URL as variant, flags as variant, targetframename as variant, postdata as variant, headers as variant, cancel as Boolean)
Text1 = URL
End sub

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.