Embedded Winform - trapping event in host javascript


Fresno Bob

Hi I am using an embedded winform control to do some drag and drop
functionality on an intranet site. I one bit of functionality I can't
get to work is firing event and trapping it in the host javascript of
the web page. All the examples are in C# and suspect there is
something I am doing wrong.
here is one the examples I have been using

<Guid("5F61E14B-9121-47cd-BB8E-A0C2B4F3BD3D")> _
<ComVisible(True)> _
<InterfaceType(ComInterfaceType.InterfaceIsIDispatch)> _
Public Interface IDragEvent
<DispId(1)> _
Event Dropped()
End Interface

<ComVisible(True)> _
<ComSourceInterfaces(GetType(IDragEvent))> _
Public Class ucDragDrop
Implements IDragEvent
Public Event droppedfile() Implements IDragEvent.Dropped

Private _FilePaths As String

Public Property FilePaths() As String
Return _FilePaths
End Get
Set(ByVal value As String)
_FilePaths = value
End Set
End Property

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
RaiseEvent droppedfile()
End Sub
End Class

<script for="objFiles" event="Dropped()" language="javascript">
alert("window control event happen!");


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question