用VB实现对WEBBROWSER1中内容的全选,复制,粘贴
Private Sub Command1_Click() 
WebBrowser1.Document.body.focus 
WebBrowser1.Document.execCommand "SelectAll" 
End Sub 
Private Sub Command2_Click() 
WebBrowser1.Document.execCommand "copy" 
End Sub 
Private Sub Command3_Click() 
WebBrowser1.Document.execCommand "paste" 
End Sub 
Private Sub Form_Load() 
WebBrowser1.Navigate "
www.google.com" 
Command1.Enabled = False 
Command1.Caption = "全选" 
Command2.Enabled = False 
Command2.Caption = "复制" 
Command3.Enabled = False 
Command3.Caption = "粘贴" 
End Sub 
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) 
Command1.Enabled = True 
Command2.Enabled = True 
Command3.Enabled = True 
End Sub   
       
本文版权:
http://www.ndfweb.cn/news-87.html