Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

I'm trying to get my head around using a custom event to pass an updated text for a statusbar in an app I'm building.

 

I have a bunch of child forms, all of which will send messages to the parent form, in order to update the statusbar.

 

Now, I know I need to use events but I am a little hazy on generating my own custom events.

 

An example, someone fills in a form, and on completion, they click OK. The form then processes, adding data to a database - if it is successful, I want it to call an event which says so in the status bar. If not, I want the same event to call, with a different message.

 

So, as far as I can see, I need to

 

1. Declare a class for my event

2. Declare a delegate

3. Declare the event in the child forms

4. Call the event

5. Handle the event in the parent form.

 

However, outside that, I am a little confused. Most tutorials on this I have found just throw code blocks at me without any context (ie. where to put the damned things).

 

So, could someone shed some light on this for me?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...