SharePoint
轻轻插一下

WebBrowser中HTML的js与winform中其他的窗体调用。。。

这是vb代码:
Imports System.Runtime.InteropServices
Imports System.Security.Permissions
'下面尖括号中也不能少也,c#为中括号。
<PermissionSet(SecurityAction.Demand, Name:="FullTrust")> <System.Runtime.InteropServices.ComVisibleAttribute(True)> _
Public Class frmPmain
    Private Sub frmPmain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    WebBrowser1.ObjectForScripting = Me'此句不可少也
    End Sub
    Public Sub qtshow()
        frmPqt.Show()
    End Sub
End Class
下面是js:
<img style="vertical-align:bottom" src="images/1.gif" name="img01" width="20%"   border="0" id="title01" onMouseOver="MM_swapImage('img01','','images/3.gif',1)" onMouseOut="MM_swapImgRestore()" onclick="window.external.qtshow()">
直接诶从项目里复制的。主要是onclick="window.external.qtshow()"
posted on 2009-09-14 20:43  轻轻插一下  阅读(863)  评论(0编辑  收藏  举报