473,468 Members | 1,389 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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?
Nov 20 '05 #1
3 868
Hi,

Create a windows hook to look for the WM_DEVICECHANGE message.
http://msdn.microsoft.com/msdnmag/is...0/CuttingEdge/
http://www.dotnet247.com/247referenc...43/217435.aspx

Ken
--------------------
"David L Wright II" <dl******@radiks.net> wrote in message
news:eJ*************@TK2MSFTNGP09.phx.gbl...
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?

Nov 20 '05 #2
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:OY**************@tk2msftngp13.phx.gbl...
Hi,

Create a windows hook to look for the WM_DEVICECHANGE message.
http://msdn.microsoft.com/msdnmag/is...0/CuttingEdge/
http://www.dotnet247.com/247referenc...43/217435.aspx

Ken
--------------------
"David L Wright II" <dl******@radiks.net> wrote in message
news:eJ*************@TK2MSFTNGP09.phx.gbl...
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?


Nov 20 '05 #3
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:eV**************@TK2MSFTNGP12.phx.gbl...
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:OY**************@tk2msftngp13.phx.gbl...
Hi,

Create a windows hook to look for the WM_DEVICECHANGE message.
http://msdn.microsoft.com/msdnmag/is...0/CuttingEdge/
http://www.dotnet247.com/247referenc...43/217435.aspx

Ken
--------------------
"David L Wright II" <dl******@radiks.net> wrote in message
news:eJ*************@TK2MSFTNGP09.phx.gbl...
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?



Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: William Bub | last post by:
I am using VB 6.0 Working Model (the one with no help files). I have a form. On a portion of the form I have a Picture Box. On the PicBox I want to draw something to follow the mouse. I can detect...
4
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I...
0
by: Sam Sungshik Kong | last post by:
Hello! If I understand correctly, MouseMove event is triggered when the mouse moves (ie when point changes). I, however, found out that it's triggered even if the mouse is not moving. What I...
3
by: Nathan Sokalski | last post by:
I have three LinkButtons in the HeaderTemplate of my DataList (I use them to let the user determine what to sort the list by). I am assuming that the event will be bubbled to the ItemCommand event...
4
by: mflll | last post by:
I am looking into the different techniques of handling arrays of edit boxes in Java Script. The first program below works fine. However, are there better ways of doing this, where the person...
2
by: ari | last post by:
I have an MDI form with a listview and a toolbar. I have 2 instances of this form running at once - lets call them A and B. If I am in A, and I click on the listview control in B, then B's enter...
1
by: tomcarr1 | last post by:
What event is triggered in ASP.Net when you close the browser ? What event is normally used to trigger clean up stuff when going from one form to another or leaving the project?
1
by: dana1 | last post by:
I have a form with several combo boxes in the header used to determine the records that will be displayed on the form. When I tab or enter from the last combo box in the header, I want the focus to...
4
by: =?Utf-8?B?Z3JlZw==?= | last post by:
Hi. I'm trying to implement a function. Users are able to control-click on components. This turns the component red, and does multi-selection and does some copying/pasting. I'm having problems...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.