Re: Custom Control Mouse Events

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hello Everyone,

I designed a custom control that is entirely covered by a picture box.
I then dragged this custom control onto a windows form application
(called main) and I need to handle mouse events in my main
application. Specifically, when a user double clicks on my custom
control I need to draw something on another picture box located in my
main application.

What I need to be able to do as I mentioned above is somehow establish
communication between the custom control and picture box.
The problem is that because the custom control is entirely covered by
its OWN picture box, whenever the user clicks on the control in
the main form, it doesn't do anything (because its picturebox is
preventing it from receiving mouse clicks.

Any ideas on how to get around this problem? I'd appreciate the help!

One solution might be to draw to the main picture box from the custom
control itself. Is that even possible? Can paint to the main picture
box through my custom control code?

Thanks for any help!

~ Maryam


.



Relevant Pages

  • Custom Control Mouse Events
    ... I designed a custom control that is entirely covered by a picture box. ... I then dragged this custom control onto a windows form application ... I'm going to attempt to draw the scenario because I think it will ...
    (microsoft.public.dotnet.languages.csharp)
  • Custom Control Mouse Events
    ... I designed a custom control that is entirely covered by a picture box. ... I then dragged this custom control onto a windows form application ... I'm going to attempt to draw the scenario because I think it will ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Custom Control Mouse Events
    ... I designed a custom control that is entirely covered by a picture box. ... I then dragged this custom control onto a windows form application ... One solution might be to draw to the main picture box from the custom ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Button with image in 2005?
    ... You would need to derive a custom control. ... Compact Framework QuickStarts in the Custom Controls section: ... Picture. ... ..NET Compact Framework User Education ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: Popup Control
    ... I think you may put your custom control on a borderless Windows form to ... relative to the button in the button click event handling method. ...
    (microsoft.public.dotnet.framework.windowsforms)