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

understanding base.Mouseup event

If a derived class handles MyBase.Mouseup does the base class have to raise
the event?

If both the base and derived class handle it will they both receive it?

If the base overrides OnMouseup and does MyBase.OnMouseUp(mea) does that
effect any of the above answers?

Thanks in advance for any insight passed along


Nov 20 '05 #1
4 1273
* " Just Me" <ne********@a-znet.com> scripsit:
If a derived class handles MyBase.Mouseup does the base class have to raise
the event?
Yes.
If both the base and derived class handle it will they both receive it?
Yes.
If the base overrides OnMouseup and does MyBase.OnMouseUp(mea) does that
effect any of the above answers?


No. If you don't call 'OnMouseUp' in the base class, the event will not
be raised at all and the handlers are not called.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #2
I'm sorry but the way I asked the questions I'm still confused.

---------------------------
If a derived class handles MyBase.Mouseup does the base class have
to raise the event?


Yes.

So I need to code a MouseUp event in the base class and raise it?
Or does the base class raise it without my help?
--------------------------
If both the base and derived class handle it will they both receive it?


Yes.


Only if the base class raises with my code as described above?

What if I don't code to raise a MouseUp event in the base?
Thanks a lot
Nov 20 '05 #3
* " Just Me" <ne********@a-znet.com> scripsit:
If a derived class handles MyBase.Mouseup does the base class have
to raise the event?


Yes.


So I need to code a MouseUp event in the base class and raise it?


No, if it is already raised by the base class' base class. In other
words: If 'Foo2' inherits from 'Foo1' and 'Foo1' raises the 'Goo'
event, it will be raised for 'Foo2' too.
If both the base and derived class handle it will they both receive it?


Yes.


Only if the base class raises with my code as described above?

What if I don't code to raise a MouseUp event in the base?


If a class' base class raises an event, it will be raised in the class
too, except you override the 'On<event name>' procedure in the derived
class and do not call the base class' 'On<event name>' procedure.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #4
Thanks a lot, again

Think I've got it now!

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ul**************@TK2MSFTNGP09.phx.gbl...
* " Just Me" <ne********@a-znet.com> scripsit:
If a derived class handles MyBase.Mouseup does the base class have
to raise the event?

Yes.


So I need to code a MouseUp event in the base class and raise it?


No, if it is already raised by the base class' base class. In other
words: If 'Foo2' inherits from 'Foo1' and 'Foo1' raises the 'Goo'
event, it will be raised for 'Foo2' too.
If both the base and derived class handle it will they both receive it?
Yes.


Only if the base class raises with my code as described above?

What if I don't code to raise a MouseUp event in the base?


If a class' base class raises an event, it will be raised in the class
too, except you override the 'On<event name>' procedure in the derived
class and do not call the base class' 'On<event name>' procedure.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 20 '05 #5

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

Similar topics

1
by: Jeremy Robertson | last post by:
I'm working on an application that manages large image files (mulit-page ..Tiff's to be exact some 1000+ pages). I've written an user control that displays a number of the images as thumbnails...
0
by: Mark Schwarz | last post by:
Hello everyone, I've a problem using SetCapture and MouseUp events. I've done an app that is doing SetCapture(Handle) on a buttonclick event and have a mouseup event that shows a MessageBox and...
7
by: Sue & Bill | last post by:
Does a double click action also generate two MouseUp events? If so, what is a good method in my MouseUp event handler to detect that a MouseUp is part of a double click action? Thanks in...
1
by: Alan | last post by:
i have a form with a label on it Private Sub Label1_mousedown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown ' do stuff End Sub ...
2
by: dave.wayne | last post by:
In a web page I have a div tag that has a onlick event registered through the event listener. However, that same div tag also has a onmousedown - start a drag and drop script The problem I am...
2
by: techsatish | last post by:
Hi, I want the double click event to call(here not able to get the MouseEventArgs) and execute the mouseup event code or any one tell me how to make my treecontrol double click nodes to behave...
3
by: Techsatish | last post by:
how to make a mouseup event called only once during a double click event? here double click is made on a tree node in a tree control. I have the code inside mouseup event....in runtime the...
12
by: Tom Bean | last post by:
I am trying to display a ContextMenuStrip when a user right-clicks on an item in a ListView and have encountered a something that seems strange to me. When the ListView is initially populated,...
2
by: markszlazak | last post by:
In the following script, a control displays (black box) in each table cell once you mouse over the cell. Mouse down on the control to change the mode of the table. Drag the mouse over cells in the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.