473,379 Members | 1,544 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,379 software developers and data experts.

events call backs

hi i have a class..i want to fire events
so a ui can respond
where can i find a good example
tks
mJ
Jul 24 '07 #1
2 1274
The help file or google?

"MikeJ" <ve***********@yahoo.comwrote in message
news:kc*******************@newssvr12.news.prodigy. net...
hi i have a class..i want to fire events
so a ui can respond
where can i find a good example
tks
mJ


Jul 24 '07 #2
1) You declare the event.

public delegate void DateValueChangingEventHandler(object sender,
DateValueEventArgs e);
public event DateValueChangingEventHandler DateValueChanging;
2) You define the argument classes (if you are using a derived
argument class).

public class DateValueEventArgs : CancelEventArgs
{
//...
}

3) You raise the event in your code :

DateValueEventArgs e = new DateValueEventArgs(oldValue, newValue);
if(DateValueChanging != null)
{
DateValueChanging(this, e);
}

=====================
Clay Burch
Syncfusion, Inc.

Jul 24 '07 #3

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

Similar topics

9
by: Grant Schenck | last post by:
I have a VC++ COM object which fires an event. I've written VB EXE apps against it and they receive the event notification. I've now built a simple VB COM object which uses the VC++ COM object...
14
by: JPRoot | last post by:
Hi I use the following syntax to have events inherited from base to child classes which works nicely (virtual and override keyword on events). But I am wondering if it is a "supported" way of using...
8
by: Michael McDowell | last post by:
I'm confused: "why do we need to assign a method to a delegate then assign the delegate to an event why not just assign the method to the events event handler" and "how does making a...
1
by: Peter Rilling | last post by:
I have an interesting problem with a datagrid. It is the standard chicken-and-the-egg problem. I have this page with two datagrids. It essentially defines a parent-child relationship. The...
11
by: Nicky Smith | last post by:
Hello, I'm studying a book on VB.net Win apps, and I'm reading a section on events and delegates and raising events. Is it just me, or is this not just subs dressed up as something else? I...
0
by: Ben Dewey | last post by:
I have a server that is configured for .NET 1.1 and 2.0. For some reason all my postback events for aren't firing when using .NET 1.1. Under IIS in ASP.NET tab, if i switch to 2.0 then the events...
20
by: David Levine | last post by:
I ran into a problem this morning with event accessor methods that appears to be a bug in C# and I am wondering if this a known issue. public event SomeDelegateSignature fooEvent; public event...
0
by: dotnet_nut | last post by:
I need to populate a combo-box based upon the selection from another combo-box without postbacks. I know its possible using asp.net 2.0 client call backs. Any samples in Vb.Net will be helpful. ...
0
by: culubalo | last post by:
Ok so this has been annoying me since yesterday but should be simple enough to do. If I create, say a picture box in an array, in code in Form1.h as follows: System::Windows::Forms::PictureBox^...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.