ndfweb.cn

用VB實現對WEBBROWSER1中內容的全選,複製,粘貼


2008-12-22 18:28:45 (7675)



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
  NDF俱乐部
  国际域名注册
  建站咨询
简体中文 NDF网站建设淘宝店 | ICO图标在线生成 | 外贸网站建设 | 联系我们
©2007-2025 NDF Corporation 鲁ICP备08005967号 Sitemap - RSSRSS订阅