Click here to Skip to main content
15,889,315 members
Home / Discussions / C#
   

C#

 
GeneralRe: Read a text in Bulgare language Pin
abbd18-Apr-09 9:09
abbd18-Apr-09 9:09 
GeneralRe: Read a text in Bulgare language Pin
Rolf Kristensen19-Apr-09 3:32
Rolf Kristensen19-Apr-09 3:32 
Question[Message Deleted] Pin
hkjghkj117-Apr-09 22:06
hkjghkj117-Apr-09 22:06 
AnswerRe: Number of lines in MultiLine TextBox with vertical scrollbar Pin
N a v a n e e t h17-Apr-09 22:21
N a v a n e e t h17-Apr-09 22:21 
AnswerRe: Number of lines in MultiLine TextBox with vertical scrollbar Pin
Xmen Real 18-Apr-09 0:14
professional Xmen Real 18-Apr-09 0:14 
General[Message Deleted] Pin
hkjghkj118-Apr-09 20:09
hkjghkj118-Apr-09 20:09 
GeneralRe: Number of lines in MultiLine TextBox with vertical scrollbar Pin
Xmen Real 18-Apr-09 20:11
professional Xmen Real 18-Apr-09 20:11 
QuestionInheritance and events Pin
Dewald17-Apr-09 21:16
Dewald17-Apr-09 21:16 
Could someone help me here please? I have a control which I derived from another. For the purpose of this post, let's say I derived from a Panel to make my own custom Panel.

Now, I want to write my own MouseClick event for this control so here is what I have:

public class MyPanel : Panel
{
   public MyPanel()
   {
      this.MouseClick += new MouseEventHandler(MyPanel_MouseClick);
   }

   private void MyPanel_MouseClick(object sender, MouseEventArgs e)
   {
      // My code here
   }
}


This works and I can put the control on a form and subscribe to its MouseClick event. What then happens in run time when the control is clicked is that the event handler specified on the form is fired first and after that has finished the event handler in the control (the one in the block of code above) is fired.

My problem is that I wanted it the other way round. I want the "internal" event handler to fire first and based on some criteria in there (for instance the position of the mouse click) I may want to prevent the "external" event handler to fire.

I hope I'm making sense. Any help perhaps?
AnswerRe: Inheritance and events Pin
DaveyM6917-Apr-09 21:34
professionalDaveyM6917-Apr-09 21:34 
GeneralRe: Inheritance and events Pin
Dewald18-Apr-09 23:03
Dewald18-Apr-09 23:03 
AnswerRe: Inheritance and events Pin
N a v a n e e t h17-Apr-09 21:42
N a v a n e e t h17-Apr-09 21:42 
QuestionDB Connectivity with Smart Device (Windows Mobile) Pin
khosnur17-Apr-09 19:23
khosnur17-Apr-09 19:23 
AnswerRe: DB Connectivity with Smart Device (Windows Mobile) Pin
N a v a n e e t h17-Apr-09 20:53
N a v a n e e t h17-Apr-09 20:53 
QuestionTargetInvocationException was unhandled by user code Pin
Dhruva Hein17-Apr-09 18:52
Dhruva Hein17-Apr-09 18:52 
AnswerRe: TargetInvocationException was unhandled by user code Pin
N a v a n e e t h17-Apr-09 20:52
N a v a n e e t h17-Apr-09 20:52 
GeneralRe: TargetInvocationException was unhandled by user code Pin
Dhruva Hein18-Apr-09 13:57
Dhruva Hein18-Apr-09 13:57 
QuestionApplication failed to initialize Pin
mrithula817-Apr-09 18:10
mrithula817-Apr-09 18:10 
AnswerRe: Application failed to initialize Pin
Henry Minute17-Apr-09 21:56
Henry Minute17-Apr-09 21:56 
QuestionCompiler Error CS0103 Help? Pin
Raymundo Valdez17-Apr-09 16:46
Raymundo Valdez17-Apr-09 16:46 
AnswerRe: Compiler Error CS0103 Help? Pin
N a v a n e e t h17-Apr-09 17:04
N a v a n e e t h17-Apr-09 17:04 
GeneralRe: Compiler Error CS0103 Help? Pin
Raymundo Valdez17-Apr-09 20:15
Raymundo Valdez17-Apr-09 20:15 
QuestionCrystal reports with C#, Displays a error message. Pin
Member 395385617-Apr-09 13:02
Member 395385617-Apr-09 13:02 
AnswerRe: Crystal reports with C#, Displays a error message. Pin
Member 395385618-Apr-09 10:10
Member 395385618-Apr-09 10:10 
QuestionHow to display relational data between more than two tables. Pin
hdv21217-Apr-09 12:27
hdv21217-Apr-09 12:27 
QuestionHow to convert PDF file to simple Text file ? Pin
Yanshof17-Apr-09 10:15
Yanshof17-Apr-09 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.