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

moving from vb.net to C#

how do i override an event (e.g. Paint)??

i'm coding a class library and i want to do some things on the paint
event, which in visual basic .net sends a "e" parameter which
contains the Graphics object used to draw anything you want.

thanks in advance...
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 15 '05 #1
3 1087
Use the override keyword.

In the example you mentioned, take the class view, select the base class method to override, right-click and click on 'Override'.

For eg;
class Base
{
public virtual void Paint()
{
...
}
}
class Derv : Base
{
public override void Paint()
{
...
}
}

HTH,
fbhcah
Nov 15 '05 #2
or just type override and select from intellisense.

--
Michael Culley
"fbhcah" <an*******@discussions.microsoft.com> wrote in message news:68**********************************@microsof t.com...
Use the override keyword.

In the example you mentioned, take the class view, select the base class method to override, right-click and click on 'Override'.

For eg;
class Base
{
public virtual void Paint()
{
...
}
}
class Derv : Base
{
public override void Paint()
{
...
}
}

HTH,
fbhcah

Nov 15 '05 #3
May be you want to do base.Paint();

Hopes that's help
ROM
www.familletaillandier.com

"Moebius" <al********@hotmail-dot-com.no-spam.invalid> a écrit dans le
message de news: 40**********@Usenet.com...
how do i override an event (e.g. Paint)??

i'm coding a class library and i want to do some things on the paint
event, which in visual basic .net sends a "e" parameter which
contains the Graphics object used to draw anything you want.

thanks in advance...
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 15 '05 #4

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

Similar topics

0
by: HeroOfSpielburg | last post by:
hi, I know this is a much-travelled subject, but I was wondering what people's thoughts were on the bare minimum (and conversely the grand scheme) for augmenting standard memory references to...
2
by: Diogo Alves - Software Developer | last post by:
Greetings I would like to knowhow can I put a sliding panel... I've done this: if (panel1.Width < 300) { while (panel1.Width < 300) { panel1.Width = panel1.Width + 40;
0
by: linkswanted | last post by:
World Moving & Storage Moving Companies and Movers We would like to take this opportunity to introduce "World Moving & Storage" to You. "World Moving & Storage" is well established, Fully...
0
by: linkswanted | last post by:
Moving Companies California http://www.movingcompanies.co.il california movers, los angeles movers, moving in california, moving to CA, Moving company los angeles, moving to los angeles.
0
by: linkswanted | last post by:
Free Moving Estimate, Local Movers, Long Distance Moving, Packing Supplies, Storage Rental, Home Moving, Apartment Moving, Office Moving, Commercial Moving, Moving Companies in your area....
0
by: linkswanted | last post by:
http://www.movingcompanies.co.il/supplies/boxes.html http://www.movingcompanies.co.il/residental/ http://www.movingcompanies.co.il/commercial/corporate-moves.html...
0
by: linkswanted | last post by:
We are your trusted source. World Moving & Storage is bonded and licensed by the U.S. Department of Transportation and is one of the largest residential moving and corporate relocation company in...
0
by: linkswanted | last post by:
We are your trusted source. World Moving & Storage is bonded and licensed by the U.S. Department of Transportation and is one of the largest residential moving and corporate relocation company in...
0
by: SuzK | last post by:
I am trying to calculate in VBA in Access 2002 a moving average and update a table with the calculations. Fields in my WeeklyData table are Week Ending (date) ItemNbr (double) Sales Dollars...
15
by: mcjason | last post by:
I saw something interesting about a grid pair puzzle problem that it looks like a machine when you find each that work out the way it does and say with all the others that work out the way they...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.