Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to create an event that is triggered by a prameter?

0 views
Skip to first unread message

David L Wright II

unread,
May 4, 2004, 4:44:34 PM5/4/04
to
I am extending the datagrid by adding 3 parameters that can be set both
during design time and run time. How can I develop an event that is
executed at run time based on the value of the parameter?


Ken Tucker [MVP]

unread,
May 5, 2004, 1:40:20 AM5/5/04
to
Hi,

Create a windows hook to look for the WM_DEVICECHANGE message.
http://msdn.microsoft.com/msdnmag/issues/02/10/CuttingEdge/
http://www.dotnet247.com/247reference/msgs/43/217435.aspx

Ken
--------------------
"David L Wright II" <dlwr...@radiks.net> wrote in message
news:eJUEcih...@TK2MSFTNGP09.phx.gbl...

Ken Tucker [MVP]

unread,
May 5, 2004, 1:46:53 AM5/5/04
to
Hi,

Sorry posted the last to the wrong message. Try something like
this.

Private mstrParameter As String
Public Event PropertyChanged(ByVal e As EventArgs)

Public Property MyParameter() As String
Get
Return mstrParameter
End Get
Set(ByVal Value As String)
mstrParameter = Value
If Not Me.DesignMode Then RaiseEvent PropertyChanged(New
EventArgs)
End Set
End Property


Ken
--------------------
"Ken Tucker [MVP]" <vb...@bellsouth.net> wrote in message
news:OY4k2NmM...@tk2msftngp13.phx.gbl...

David L Wright II

unread,
May 5, 2004, 2:02:09 AM5/5/04
to
Ken,

Your example was exactly what I was looking for and it's quite simple.

Thanks,
Dave


"Ken Tucker [MVP]" <vb...@bellsouth.net> wrote in message

news:eV3wgRmM...@TK2MSFTNGP12.phx.gbl...

0 new messages