Re: How to Prevent Mouse Movement and Clicks From Reaching Control

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Charles Law (blank_at_nowhere.com)
Date: 04/12/04


Date: Tue, 13 Apr 2004 00:41:27 +0100

Hi yEaH rIgHt

Thanks for the idea. I have just tried it and it all behaves the same, but
the concept seems to be pointing the way. I will read up on it.

I put the Capture = True in the base class of my user controls so that it is
set automatically for anything that inherits from it, unless I have missed
something and I need to put it somewhere else?

Charles

"yEaH rIgHt" <nothanks@haha.com> wrote in message
news:107ls79our10303@corp.supernews.com...
> Me.Capture = True
>
> This will keep all of your controls from receiving any mouse messages.
> You'll have to move any controls in the Forms mouse move events.
>
> Charles Law wrote:
> > Sorry for reposting this question, but I did not get a single answer
last
> > time, and I'm sure you guys must have some thoughts on the matter.
> >
> > I have a user control which can be dragged and dropped onto a form in my
> > application when it is running. I allow it to be clicked and dragged to
a
> > new location on the form. However, the user control has a check box on
it,
> > and if the user clicks over the checkbox to drag the user control, the
check
> > box changes state.
> >
> > Is there a way that I can simulate the design mode effect of the VS IDE,
> > such that whilst designing a form controls do not behave in the normal
way?
> > The same problem occurs if clicking over a dropdown list: the list drops
> > down and then the control can be dragged away from under it. It doesn't
look
> > very good.
> >
> > It would be nice to stop all mouse effects on the member controls of my
user
> > control, for example, checkboxes with the popup style change their
> > appearance when the mouse moves over them, but I would like to suppress
this
> > whilst my user control is in 'design mode'.
> >
> > Just to clarify, although I use the term 'design mode' my application is
> > actually running. I am just referring to the state in which it is
running,
> > that is I allow users to design a simple form and then turn design mode
off,
> > whereupon the form should behave normally.
> >
> > TIA
> >
> > Charles
> >
> >



Relevant Pages

  • How to keep cursor within the scope of a custom user control ?? Got it to work, kind of.
    ... I created a frmMain ArrayList of the user controls hosted by frmMain. ... the cursor still jumped from the selected user control to ... frmMain when I tabbed past the last textbox on the user control. ...
    (microsoft.public.dotnet.languages.csharp)
  • How do you directly send messages / events to controls?
    ... each textbox, and these leave events update a data structure which is ... I have a user control, which has a FlowLayout Panel which has other user ... The user controls in the panel are mostly just visual ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Cannot remove a user control from the toolbox
    ... Unless the toolbox will allow you to remove the item from the context menu ... (which I doubt, as "Delete" is normally disabled for user controls), I'm ... I tried to remove the user control from the toolbox (thinking I'd ... >DFType wdf; ...
    (microsoft.public.vstudio.development)
  • Cannot remove a user control from the toolbox
    ... I'm having a devil of a time with VS "losing" my user controls from forms. ... problem was probably that VS had somehow lost it's link to the user control. ... I tried to remove the user control from the toolbox (thinking I'd re-add ... DFType wdf; ...
    (microsoft.public.vstudio.development)
  • Re: CurrentUser and breakpoints
    ... nothing happens - the form remains in design mode without errors claiming. ... don't flip from design to view mode. ... Is not clear how setting properties in the forms on-open event has any ... modifies the actual values controls on the form action MUST be placed in the ...
    (microsoft.public.access.formscoding)