0

Is it possible for a UserControl to be transparent to mouse clicks/drags etc. and pass them to the control underneath it?

dotNET
  • 33,414
  • 24
  • 162
  • 251
  • 1. Have you tried anything? If so add code. 2. Add your language to the tags (C#, VB.NET) it will increase the possibility of help a lot. I'll start checking to see if I find anything in the meantime. – WozzeC Jun 17 '13 at 06:51
  • Can this be what you are looking for? http://stackoverflow.com/questions/547172/pass-through-mouse-events-to-parent-control – WozzeC Jun 17 '13 at 06:52
  • Thanks @WozzeC. I'm basically using it to do some drawing on top of a `TextBox`, without losing its normal functionality such as selection of text. I first tried to keep the drawing layer behind the textbox, to avoid hittest problem, but the TextBox itself doesn't do very good with transparency and so my drawing layer doesn't show. I'm now trying the other way around, by keeping the drawing layer on top. As for the languages, it is really a non-matter here, we can translate between C# and VB.NET, yey! – dotNET Jun 17 '13 at 06:56
  • @WozzeC: Thanks again. I'm trying it, but it looks like it will pass the event to the parent control and not the TextBox behind it, right? – dotNET Jun 17 '13 at 06:59
  • Yes, that is how I figured you wanted to do this. I sence I got that wrong. Either way you should be able to invoke "Textbox.focus()" from the UserControl base when clicked. Marking stuff might be quite hard though. – WozzeC Jun 17 '13 at 07:04

0 Answers0