Groups | Blog | Home
all groups > c# > april 2005 >

c# : Newbie Question - Intellisense with this.OnLoad event


damiensawyer NO[at]SPAM yahoo.com.au
4/17/2005 3:43:04 PM
Hello all,

I'm in the process of transfering from VB to C# and am having a bit of
trouble getting the hang of the intellisense.

I wish to add events to my form - in this case, the onLoad event. I've
been in the habbit of typing object.event+=.... The intellisense then
kicks in and, as you'd all know, builds the method signatures for me
when I press [tab].

However, this doesn't seem to work with the form events - ie
this.OnLoad+= does nothing.

Can someone please help?

Thanks in advance,


John Davison
4/17/2005 11:30:11 PM
[quoted text, click to view]

This works the same way in C#. Perhaps the object you are trying to add
the event to doesn't support it.

Damien Sawyer
4/18/2005 12:00:00 AM
Hi John,

Sorry - maybe I didn't make myself clear. That += code 'was' for C#.

form most definate does support the onLoad event - it's a primary event.

My question is, how do I automatically generate a method for it.


Thanks again in advance



DS

Damien Sawyer
4/18/2005 12:00:00 AM
Aaaaah! That's it!

Thanks very much John :-)




DS

John Davison
4/18/2005 10:57:34 AM
[quoted text, click to view]

I'm sorry, I should have read your post a little more closely. It
should be

this.Load +=

not

this.OnLoad +=

AddThis Social Bookmark Button