الرئيسية > comp > gb.qt > key > shift 
 en fr de es it nl pl pt pt_BR mk sq ca hu cs tr fa id vi ko ja ru zh zh_TW eo
السابق  التالي  تحرير  إعادة تسمية  تراجع  بحث  الإدارة  
المستندات  
تحذير! هذه الصفحة لم يتم ترجمتها.  See english version 
Key.Shift (gb.qt)
STATIC PROPERTY READ Shift AS Boolean

Returns if the SHIFT key is pressed.

This is inside ..._KeyPress or ..._KeyRelease Events.

مثال

' Needing a Button1; with the focus on it( Use the Tab key).
' can cut and Paste this  example.

PUBLIC SUB Button1_KeyPress()
  IF Key.Shift THEN
    Button1.Text = " True " & CString(Time)
  ELSE
    Button1.Text = " False " & CString(Time)
  ENDIF
END

PUBLIC SUB Form_KeyPress()
' Control KeyPress event will often pass through to this Form event.
  DIM altSet AS Boolean
  TRY altSet = Key.Shift
  altSet = IIf( ERROR , FALSE, altSet)
  IF altSet THEN
    ME.Text = CString(Time) & " True: Control key is being held down"
  ELSE
    ME.Text = CString(Time) & " False: Control key was not held down"
  ENDIF
END

إنظر أيضا

  KeyPress, , KeyRelease