Newbie Question - Intellisense with this.OnLoad event

D

Damien Sawyer

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,


Damien Sawyer
 
J

John Davison

Damien said:
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,


Damien Sawyer

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

John
 
D

Damien Sawyer

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
 
J

John Davison

Damien said:
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

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

this.Load +=

not

this.OnLoad +=

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top