VB.NET | Klavye ve Mouse'u Devredışı Bırakmak

D

Drenated

Legend Member
Joined
Nov 23, 2019
Messages
1,865
Reaction score
1,517
Visual Basic kullanarak PC'ye girişleri devre dışı bırakabiliriz.

Forma 1'er adet Timer ve Command ekliyoruz.

Code:
Option Explicit

Private Declare Function BlockInput Lib "user32" (ByVal fBlock _
As Long ) As Long

Const API_FALSE = 0&
Const API_TRUE = 1&

Private Sub Command1_Click( )
Timer1.Interval = 500
Timer1.Enabled = True
Call BlockInput(API_TRUE )
End Sub

Private Sub Timer1_Timer( )
Static Cnt As Long

Cnt = Cnt + 1
If Cnt > 10 Then
Cnt = 0
Timer1.Enabled = False
Call BlockInput(API_FALSE )
Label1.Caption = ""
Else
Label1.Caption = "Açılması İçin Kalan Zaman: " _
& Format$(CStr((10 - Cnt ) ) / 2, "0.0" )
End If
End Sub
 
SPAM IS FORBIDDEN!
  • SPAMMERS ARE BANNED FROM THE FORUM AND CANNOT USE ANY OF THE CHEATS
  • For example: thanks, thx, very good, asdqwe, working, ty and so on!
  • For example: Writing the same message over and over. thanks, thx and so on!
  • Copying and copying someone else's message is prohibited.
  • It is forbidden to send messages to increase the number of comments on threads that you have no knowledge of.
  • Write your own opinion when commenting!
  • If you see spam message, please let us know with the REPORT button!

Tema düzenleyici

Top Bottom