タイトル : Re^11: VB6.0 WebBrowserについて 投稿日 : 2008/06/11(Wed) 11:07 投稿者 : ヒロキ
> '---- > Option Explicit > > Private WithEvents Doc As MSHTML.HTMLDocument > Private WithEvents Win As MSHTML.HTMLWindow2 > > Private Sub Form_Load() > WebBrowser1.Navigate "http://www.google.com" > End Sub > > Private Sub Doc_onkeydown() > With Win.event > If .ctrlKey And .keyCode = vbKeyP Then > .keyCode = 0 > .returnValue = False > .cancelBubble = True > End If > End With > End Sub > > Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) > Set Doc = pDisp.Document > Set Win = Doc.parentWindow > End Sub あ |