473,915 Members | 5,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 DownChangeDeleg ate(object sender, bool DownState);
public event DownChangeDeleg ate 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 1131
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.co m

"Paul Cheetham" <PA******@dsl.p ipex.com> wrote in message
news:%2******** ********@tk2msf tngp13.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 DownChangeDeleg ate(object sender, bool DownState);
public event DownChangeDeleg ate 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
2046
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 should be reproducible with that version at least. BACKGROUND: =========== When you open this page in your browser, you will see a 4 cell table. The cells contain the following items respectively:
10
10128
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, except a drop down box. Once the user selects from the pull down menu, I have code that picks the applicable fields to be visible. Thus, if a user makes changes to the pull down menu, ie. changes the value in the pull down, I need everything to go...
7
3238
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 write my own Page.DataBind() to step through and only bind to visible controls, or is there a better solution?
4
7128
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, image N, the panel N becomes visible and all the other invisible.
15
3775
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. How do i hide a column? Thanks. MyConnection = New SqlConnection("server=(local);database=pubs;Trusted_Connection=yes") MyCommand = New SqlDataAdapter("select * from Authors",
11
15028
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 in that row. I'm trying to make this work all day, but it's not going to work. I tried this in the rowCreated event. I am able to find the right row and cell in this row (as a datarow), but now the right gridview
2
3232
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 events. Unfortunately, it appears to do so only with mouse events, not key events. Is there a better solution than the following? :
1
3115
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 the button logout is visible. Otherwise is invisible.
2
1289
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 double-click a selected row. How can i do? Thanks in advance.
5
2037
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 readonly mode, the requiredFieldValidaters are set to disabled, the character counter for each textbox is made invisible and edit buttons show up next to the read only textboxes. I want to make the Add button invisible and then make a save changes...
0
10039
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9883
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10928
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10543
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9734
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7259
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5944
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4346
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.