DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub auto_open()
CreateObject("Wscript.Shell").SendKeys "{CAPSLOCK}"
End Sub
Private Declare Function GetKeyState Lib _
"user32" (ByVal nVirtKey As Long) As Long
Private Function GetCapsLockKey() As Boolean
GetCapsLockKey = GetKeyState(vbKeyCapital)
End Function
Sub test()
If GetCapsLockKey Then _
CreateObject("Wscript.Shell").SendKeys "{CAPSLOCK}"
End Sub
Küçük bir eksik vardı.Zeki bey bu kod da direk açık olan caps locu kapatıyor..
Private Declare Function GetKeyState Lib _
"user32" (ByVal nVirtKey As Long) As Long
Private Function GetCapsLockKey() As Boolean
GetCapsLockKey = GetKeyState(vbKeyCapital)
End Function
Sub test()
If [COLOR=Blue][B]Not[/B][/COLOR] GetCapsLockKey Then _
CreateObject("Wscript.Shell").SendKeys "{CAPSLOCK}"
End Sub
Private Declare Function GetKeyState Lib _
"user32" (ByVal nVirtKey As Long) As Long
Private Function GetCapsLockKey() As Boolean
GetCapsLockKey = GetKeyState(vbKeyCapital)
End Function
[LEFT]Sub Auto_Open()[/LEFT]
If [COLOR=black]Not[/COLOR] GetCapsLockKey Then CreateObject("Wscript.Shell").SendKeys "{CAPSLOCK}"
[COLOR=red]'Sizin kodlarınız...[/COLOR]
[LEFT]End Sub[/LEFT]
Option Explicit
Private Declare Function GetKeyState Lib _
"user32" (ByVal nVirtKey As Long) As Integer
Public Function CapsLockOn() As Boolean
Dim iKeyState As Integer
iKeyState = GetKeyState(vbKeyCapital)
CapsLockOn = (iKeyState = 1 Or iKeyState = -127)
End Function
Sub Auto_Open()
If CapsLockOn() Then
MsgBox "CapsLock Açık"
Else
MsgBox "CapsLock Kapalı"
End If
End Sub
Private Declare PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Private Const kCapital = 20
Private Const kNumlock = 144
Public Function CapsLock() As Boolean
CapsLock = KeyState(kCapital)
End Function
Public Function NumLock() As Boolean
NumLock = KeyState(kNumlock)
End Function
Private Function KeyState(lKey As Long) As Boolean
KeyState = CBool(GetKeyState(lKey))
End Function
Sub Test()
If CapsLock = False Then CreateObject("Wscript.Shell").SendKeys "{CAPSLOCK}"
If NumLock = True Then CreateObject("Wscript.Shell").SendKeys "{NUMLOCK}"
End Sub