
how to Send the CTRL+SHIFT keys (no other key)
Quote:
>>>I search a way to send a CTRL+SHIFT in Windows 95 with VB3.
SORRY, I don't know what happened the last time.
I believe that this will do what you want.
Save the sample below as Form1.frm, then load it in VB and RUN it.
====== Save as Form1.frm ===========
VERSION 2.00
Begin Form Form1
BackColor = &H00C0C0C0&
Caption = "Form1"
ClientHeight = 2148
ClientLeft = 3996
ClientTop = 3120
ClientWidth = 3336
Height = 2532
Left = 3948
LinkTopic = "Form1"
ScaleHeight = 2148
ScaleWidth = 3336
Top = 2784
Width = 3432
Begin TextBox Text1
Height = 288
Left = 1584
TabIndex = 0
Text = "Text1"
Top = 336
Width = 972
End
Begin Label Label6
BorderStyle = 1 'Fixed Single
Height = 288
Left = 1584
TabIndex = 6
Top = 1584
Width = 972
End
Begin Label Label5
BackStyle = 0 'Transparent
Caption = "KeyCode%"
Height = 288
Left = 480
TabIndex = 5
Top = 1584
Width = 972
End
Begin Label Label4
BorderStyle = 1 'Fixed Single
Height = 288
Left = 1584
TabIndex = 4
Top = 1152
Width = 972
End
Begin Label Label3
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Shift%"
Height = 288
Left = 480
TabIndex = 3
Top = 1152
Width = 972
End
Begin Label Label2
BorderStyle = 1 'Fixed Single
Height = 288
Left = 1584
TabIndex = 2
Top = 720
Width = 1308
End
Begin Label Label1
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Keys Pressed"
Height = 288
Left = 144
TabIndex = 1
Top = 720
Width = 1296
End
End
Sub Text1_KeyDown (KeyCode As Integer, Shift As Integer)
Select Case Shift%
Case 1: Shft$ = "Shift": Label2.Caption = "Shift"
Case 3: Shft$ = "Alt": Label2.Caption = "Shift/CTRL"
Case 5: Shft$ = "Ctrl": Label2.Caption = "Shift/ALT"
Case Else: Label2.Caption = ""
End Select
Label4.Caption = Shift%
Label6.Caption = KeyCode%
End Sub