Re: Capture Shift Held Down When Application Starts?

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

From: Samuel R. Neff (blinex_at_newsgroup.nospam)
Date: 02/14/05


Date: Mon, 14 Feb 2005 13:39:21 -0500


If Control.ModifierKeys = Keys.Shift Then
        ' Shift is being held down.. special processing...
End If

This checks if Shift is the only modifier key being pressed. If you
want to check if shift or any other key is pressed, then use

If (Control.ModifierKeys And Keys.Shift) = Keys.Shift Then
        ' Shift is being held down.. special processing...
End If

HTH,

Sam

>> Hi All,
>>
>> I'm writing a launcher program which checks for updates and copies them down
>> to the client.
>> However, I would like the user to be able to modify the settings for the
>> launcher. As this runs automatically, I would like it to be configurable by
>> the user holding down the shift key when double-clicking my exe, to bypass
>> the usual update routine and start the config form.
>>
>> Access does something similar, by holding down the shift to bypass the
>> autoexec macros with automatically starts on startup.
>>
>> I'm already checking for command parameters to start the config, but that
>> isn't acceptable, and the user would have to modify the shortcut etc.
>>
>> Any ideas?
>>
>> Thanks
>>
>> Alex

B-Line is now hiring one VB.NET developer for
WinForms + WebServices position with ASPX in future.
Seaking mid to senior level developer. For
information or to apply e-mail sam_blinex_com.



Relevant Pages

  • Re: Capture Shift Held Down When Application Starts?
    ... This checks if Shift is the only modifier key being pressed. ... >> the usual update routine and start the config form. ... Seaking mid to senior level developer. ...
    (microsoft.public.dotnet.general)
  • Re: Capture Shift Held Down When Application Starts?
    ... This checks if Shift is the only modifier key being pressed. ... >> the usual update routine and start the config form. ... Seaking mid to senior level developer. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Detecting select/adjust on file drag
    ... to check for a specific modifier key, which OS_Byte 121 allows you, as ... do funny things when a file is dragged to an application with Shift ... guarantee that they will be available in future versions of the Filer. ... working in RO5 because the Filer interprets Alt-double-clicks itself. ...
    (comp.sys.acorn.programmer)
  • Re: Capture Shift Held Down When Application Starts?
    ... one of the modifier keys (SHIFT, CTRL, & ALT) is in a pressed state or not? ... > the user holding down the shift key when double-clicking my exe, to bypass ... > the usual update routine and start the config form. ...
    (microsoft.public.dotnet.framework)
  • Re: Capture Shift Held Down When Application Starts?
    ... one of the modifier keys (SHIFT, CTRL, & ALT) is in a pressed state or not? ... > the user holding down the shift key when double-clicking my exe, to bypass ... > the usual update routine and start the config form. ...
    (microsoft.public.dotnet.general)