override C# OnPaint method of parent Form class in VS2005

C

cok

Hi, all

I have a question about VS 2005 IDE, I donn't know if
It is place to post my question,sorry

I have a class inherit form System.Windows.Forms.Form,
I want to override OnPaint method , In Project Class View,
I right click MyForm, but there is no Item about
"Override method" in the contex menu, In the form class property page,
I find "Paint" even, I know this is good and can use,
but I really want to know:
in VS2005, wheather there is a wizard to help developer override a method
of all it's parent class,

Thanks,


thanks for any advice!

--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/
_/ Nie Longhai , coder -_-|||
_/ Shanghai Xomi Instruments Co., Ltd.
_/ URL: http://www.xomi.cn
_/ Shanghai C&U Industrial Park
_/ Feng Cheng Town, Feng Xian District
_/ Shanghai, 201411
_/ Phone:86-21-57513966-807
_/ Fax:86-21-57513636
_/ Mobile:13162055440
_/ Email:[email protected] ,[email protected]
_/
_/ Profession & Focus
_/ High precision semiconductor metrology system vendor.
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 
M

Mehdi

I have a class inherit form System.Windows.Forms.Form,
I want to override OnPaint method , In Project Class View,
I right click MyForm, but there is no Item about
"Override method" in the contex menu, In the form class property page,
I find "Paint" even, I know this is good and can use,
but I really want to know:
in VS2005, wheather there is a wizard to help developer override a method
of all it's parent class,

In your class, type protected override and Intellisense will pop up with
the list of methods that you can override.
 
C

cok

Hi Mehdi

so many thanks to you ^^


Mehdi said:
In your class, type protected override and Intellisense will pop up with
the list of methods that you can override.
 
K

Kevin Spencer

Add the following method to your Form code:

protected override void OnPaint(PaintEventArgs e)
{
}

By the time you type "override" the Intellisense should be starting to kick
in, providing a list of overridable methods to choose from.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

This is, by definition, not that.
 
C

cok

Hi ,Kevin

thank you very much

Kevin Spencer said:
Add the following method to your Form code:

protected override void OnPaint(PaintEventArgs e)
{
}

By the time you type "override" the Intellisense should be starting to
kick in, providing a list of overridable methods to choose from.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

This is, by definition, not that.
 

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