473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Invisible Event

Hi,

I have created a custom component in c#, and I have added a new event to it.

I have a problem however in getting the event to show in the event list
in the properties window.

I have declared the event as follows:

public delegate void DownChangeDelegate(object sender, bool DownState);
public event DownChangeDelegate DownChanged;
I'm sure I must be missing something in order to make this visible, but
I've searched all over and everything I can find on events doesn't
mention anything about this.
Any help greatly appreciated.

Thanks.

Paul Cheetham
Jan 4 '06 #1
2 1118
Paul,

Have you recompiled your code? This might be it. I imagine you already
have, but it's worth a shot.

There are a few things to note about what you did with the DownState
parameter:

- It should be cased in camel case to conform to the public naming
conventions.
- It should be named "e" to conform with the existing event pattern already
established.
- It should be a type derived from EventArgs which exposes a property
DownState, which will return the value of whether or not the state is set or
not.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Paul Cheetham" <PA******@dsl.pipex.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

I have created a custom component in c#, and I have added a new event to
it.

I have a problem however in getting the event to show in the event list in
the properties window.

I have declared the event as follows:

public delegate void DownChangeDelegate(object sender, bool DownState);
public event DownChangeDelegate DownChanged;
I'm sure I must be missing something in order to make this visible, but
I've searched all over and everything I can find on events doesn't mention
anything about this.
Any help greatly appreciated.

Thanks.

Paul Cheetham

Jan 4 '06 #2

Hi Nicholas,

Yes I have re-built my code several times - still nothing.

I can change the argument passing, but this shouldn't prevent it from
working should it?

Thankyou.
Paul

Nicholas Paldino [.NET/C# MVP] wrote:
Paul,

Have you recompiled your code? This might be it. I imagine you already
have, but it's worth a shot.

There are a few things to note about what you did with the DownState
parameter:

- It should be cased in camel case to conform to the public naming
conventions.
- It should be named "e" to conform with the existing event pattern already
established.
- It should be a type derived from EventArgs which exposes a property
DownState, which will return the value of whether or not the state is set or
not.

Hope this helps.

Jan 4 '06 #3

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

Similar topics

11
by: Saqib Ali | last post by:
Please excuse me, this is a fairly involved question that will likely require you to save the file below to a file and open it in a browser. I use Mozilla 1.5, so the problem I describe below...
10
by: Cy | last post by:
I've had good luck with posting in the past, so we'll see how things go this time...:) I have an Access 2000 form. On the form is about 40 objects. I want to set everything to invisible,...
7
by: Martin | last post by:
Hi, I have a page where according to the mode of use, different controls are visible. I had assumed that Page.DataBind() would only bind visible controls, but apparently not. Do I have to...
4
by: Miguel Dias Moura | last post by:
Hello, i have 5 panels in an ASP.net / VB page. The panel 1 is visible the other 4 are NOT visible. I also have 5 images: image 1, image 2, ..., image5. When i click one of the images,...
15
by: John Blair | last post by:
Hi, Code attached but the line that gives me an error is MyDataGrid.Columns(2).Visible = False It actually gives me an error for any value instead of 2 even when 9 bound columns of data exist....
11
by: Jo | last post by:
Hi all, I have a gridview displaying a dataset and some buttons. When a certain cell of this datasetrow is empty, I want a button in that row to be visible, otherwise no button should be shown...
2
by: Arnaud Diederen | last post by:
Hello, I cannot succeed in getting any key event on a div that's been set invisible by the style's MozOpacity property under firefox. I'm using this method so that I can capture the mouse...
1
by: shapper | last post by:
Hello, I have a link button which signs out the user when it is clicked. I place on by button the code line ibLogout.Visible = My.User.IsAuthenticated. So, when the user is authenticated...
2
by: ssailor | last post by:
I have a datagridview filled with data from an external table. I store the Key field in the first column and make it invisible. But I want to visit this invisible column to get the Key data when I...
5
by: Andy B | last post by:
I have 2 TextBoxes and an Add button on a page. When the user fills in the TextBoxes, the values are added to a dataset table. When the page gets done reloading, the TextBoxes are turned into...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.