> I have a need for an extra facility to be available when the user presses
the SHIFT key whilst clicking on either a Button Control or a textbox.
I am using both VB6 and VB.NET2002.
Could anyone please advise on the best way of managing this.
Answer for VB6
================
The TextBox and CommandButton controls both have MouseDown and MouseUp
events... use one (or both depending on what you need) of them instead of
the Click event... both the MouseDown and MouseUp events have a Shift
parameter which you can test for... use the vbShiftMask constant to test the
Shift parameter to see if the Shift key is down (you can also test for the
Ctrl and Alt keys using this parameter).
Answer for VB.NET2002
======================
Almost everybody in this newsgroup is using VB6 or lower. While you may get
a stray answer to VB.NET (including VB2003 and VB2005 which has dropped .NET
from its name) questions here, you should ask them in newsgroups devoted
exclusively to .NET programming (the languages are different enough to
warrant separate newsgroup support). Look for newsgroups with either the
word "dotnet" or "vsnet" in their name.
For the microsoft news server, try these newsgroups for Visual Basic .NET
related questions...
microsoft.public.dotnet.languages.vb
microsoft.public.dotnet.languages.vb.upgrade
microsoft.public.dotnet.languages.vb.controls
microsoft.public.dotnet.languages.vb.data
And these for more general .NET questions
microsoft.public.dotnet.general
microsoft.public.vsnet.general
Note: There are many other .NET newgroups (use the first three "fields" from
the last two as templates when searching for them), but the above ones
should get you started.
Rick