Is it possible to identify when the Ctrl Key is down whilst clicking on a
checkbox on a windows form?
I have a checkbox on a User Control on a Tab on a windows form.

Re: Catching Ctrl + Click on a checkbox by Kevin

Kevin
Mon Apr 23 05:52:19 CDT 2007

Write an override for the OnKeyDown and OnKeyUp methods, and set a boolean
variable indicating if the Ctrl key is currently depressed.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Boon" <Boon@discussions.microsoft.com> wrote in message
news:9AB5596A-67D2-440D-B431-FA8911242ACE@microsoft.com...
> Is it possible to identify when the Ctrl Key is down whilst clicking on a
> checkbox on a windows form?
> I have a checkbox on a User Control on a Tab on a windows form.



Re: Catching Ctrl + Click on a checkbox by Boon

Boon
Mon Apr 23 18:06:01 CDT 2007

I tried this on the main form, on the panel on the tab control on form and on
the checkbox control itself with out any luck firing these functions. Also
trapping the KeyDown events.

"Kevin Spencer" wrote:

> Write an override for the OnKeyDown and OnKeyUp methods, and set a boolean
> variable indicating if the Ctrl key is currently depressed.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
>
> Printing Components, Email Components,
> FTP Client Classes, Enhanced Data Controls, much more.
> DSI PrintManager, Miradyne Component Libraries:
> http://www.miradyne.net
>
> "Boon" <Boon@discussions.microsoft.com> wrote in message
> news:9AB5596A-67D2-440D-B431-FA8911242ACE@microsoft.com...
> > Is it possible to identify when the Ctrl Key is down whilst clicking on a
> > checkbox on a windows form?
> > I have a checkbox on a User Control on a Tab on a windows form.
>
>
>

Re: Catching Ctrl + Click on a checkbox by Stoitcho

Stoitcho
Tue Apr 24 09:41:00 CDT 2007

Hi Boon,
In any of the mouse events or the Click event you can check the ModiferKeys
that will give you the state of the Contol, Shift and Alt key when the event
happened.

ModiferKeys is static property of the Control class so it is available in
any winforms control.

HTH

--
Stoitcho Goutsev (100)

"Boon" <Boon@discussions.microsoft.com> wrote in message
news:1707069D-2315-4348-AE0B-01E54CE4040C@microsoft.com...
>I tried this on the main form, on the panel on the tab control on form and
>on
> the checkbox control itself with out any luck firing these functions. Also
> trapping the KeyDown events.
>
> "Kevin Spencer" wrote:
>
>> Write an override for the OnKeyDown and OnKeyUp methods, and set a
>> boolean
>> variable indicating if the Ctrl key is currently depressed.
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>>
>> Printing Components, Email Components,
>> FTP Client Classes, Enhanced Data Controls, much more.
>> DSI PrintManager, Miradyne Component Libraries:
>> http://www.miradyne.net
>>
>> "Boon" <Boon@discussions.microsoft.com> wrote in message
>> news:9AB5596A-67D2-440D-B431-FA8911242ACE@microsoft.com...
>> > Is it possible to identify when the Ctrl Key is down whilst clicking on
>> > a
>> > checkbox on a windows form?
>> > I have a checkbox on a User Control on a Tab on a windows form.
>>
>>
>>



Re: Catching Ctrl + Click on a checkbox by Boon

Boon
Tue Apr 24 23:18:00 CDT 2007

Thank you very much.
Exactly what I needed

"Stoitcho Goutsev (100)" wrote:

> Hi Boon,
> In any of the mouse events or the Click event you can check the ModiferKeys
> that will give you the state of the Contol, Shift and Alt key when the event
> happened.
>
> ModiferKeys is static property of the Control class so it is available in
> any winforms control.
>
> HTH
>
> --
> Stoitcho Goutsev (100)
>
> "Boon" <Boon@discussions.microsoft.com> wrote in message
> news:1707069D-2315-4348-AE0B-01E54CE4040C@microsoft.com...
> >I tried this on the main form, on the panel on the tab control on form and
> >on
> > the checkbox control itself with out any luck firing these functions. Also
> > trapping the KeyDown events.
> >
> > "Kevin Spencer" wrote:
> >
> >> Write an override for the OnKeyDown and OnKeyUp methods, and set a
> >> boolean
> >> variable indicating if the Ctrl key is currently depressed.
> >>
> >> --
> >> HTH,
> >>
> >> Kevin Spencer
> >> Microsoft MVP
> >>
> >> Printing Components, Email Components,
> >> FTP Client Classes, Enhanced Data Controls, much more.
> >> DSI PrintManager, Miradyne Component Libraries:
> >> http://www.miradyne.net
> >>
> >> "Boon" <Boon@discussions.microsoft.com> wrote in message
> >> news:9AB5596A-67D2-440D-B431-FA8911242ACE@microsoft.com...
> >> > Is it possible to identify when the Ctrl Key is down whilst clicking on
> >> > a
> >> > checkbox on a windows form?
> >> > I have a checkbox on a User Control on a Tab on a windows form.
> >>
> >>
> >>
>
>
>