This article is about the technology, only support IE browser, please note to readers
The WebBrowser control is the built-in control for IE browser. As the name implies, this control can be viewed as the browser itself. With the WebBrowser control, you can implement some of the menu commands of IE browser.
1. Use
First create this control on the screen through the <object> tab.
2. Calling methods
WEBBROWSER.EXECWB nCmdID, Ncmdexecopt, [Pvain], [pvaout]
The command is executed through the EXECWB method of this control. For example, the opening function of a menu:
Document.all.WebBrowser.ExecWB (a);
3. Parameters of the method
3.1 nCmdID parameters (these parameters can be used to know the function of the corresponding menu by the variable name, which is no longer described individually)
3.2 ncmdexecopt parameter (not know how, the second parameter uses 1)
3.3 Common parameters
WEBBROWSER.EXECWB //Open WEBBROWSER.EXECWB (2,1) //Close all IE windows now and open a new window WEBBROWSER.EXECWB (4,1) // Save page WEBBROWSER.EXECWB (6,1) //Print WEBBROWSER.EXECWB (7,1) //Print preview WEBBROWSER.EXECWB (8,1) // Print Page Setup WEBBROWSER.EXECWB (10,1)//View page Properties WEBBROWSER.EXECWB (15,1)//appear to be revoked, pending confirmation WEBBROWSER.EXECWB (17,1)// Select All WEBBROWSER.EXECWB (22,1)//Refresh WEBBROWSER.EXECWB (45,1)//close the form without prompting
4. Test page
<! DOCTYPE html>