Option Explicit
Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long
Private Sub Command1_Click()
Timer1.Enabled = True
BlockInput True
End Sub
'Gunakan kode di bawah, agar komputer Anda tidak usah di restart
Private Sub Form_Load()
Timer1.Interval = 1000 '1 detik
Timer1.Enabled = False
End Sub
'Timer1.Interval = 1000 '1 detik
Private Sub Timer1_Timer()
Static i As Integer
i = i + 1
If i > 5 Then 'tunggu 5 detik
BlockInput False 'aktifkan kembali keyboard dan mouse
i = 0
End If
End Sub
Friday, June 8, 2012
Menonaktifkan Keyboard dan Mouse - BlockInput
Mouse Properties Dialog, Bagaimana Cara Menampilkannya?
Di bawah merupakan kode untuk menampilkan mouse properties dialog menggunakan VB6 (Visual Basic 6) - Bagaimana menampilkan mouse properties dialog ini, bisa Anda lihat di bawah:
READ MORE - Mouse Properties Dialog, Bagaimana Cara Menampilkannya?
Option Explicit
Private Sub Command1_Click()
Dim dblReturn As Double
dblReturn = Shell("rundll32.exe shell32.dll,Control_RunDLL main.cpl @0", 5)
End Sub
Cara Menampilkan Dialog Properties KeyBoard Menggunakan VB6
Berikut merupakan VB6 kode untuk menampilkan kotak dialog properties keyboard:
READ MORE - Cara Menampilkan Dialog Properties KeyBoard Menggunakan VB6
Option Explicit
Private Sub Command1_Click()
Dim dblReturn As Double
dblReturn = Shell("rundll32.exe shell32.dll,Control_RunDLL main.cpl @1", 5)
End Sub
Labels:
Windows
Mengubah Format DOS 8.3 menjadi Long Filename
Mengubah format DOS 8.3 menjadi long filename, contohnya: G:\PROJEC~1\BILLIN~1\BILLIN~1\Client\CLIENT~1.EXE menjadi: G:\Project-ku\Billing Warnet\Billing Warnet\Client\Client Cafe.exe. Nah bagaimana kode konversi format DOS 8.3 ini, bisa Anda perhatikan di bawah:
READ MORE - Mengubah Format DOS 8.3 menjadi Long Filename
Option ExplicitContoh penggunaan kode di atas:
Private Declare Function GetLongPathName Lib "kernel32" Alias "GetLongPathNameA" (ByVal lpszShortPath As String, ByVal lpszLongPath As String, ByVal cchBuffer As Long) As Long
Public Function GetLongPath(ByVal Filename As String) As String
On Error Resume Next
Dim length As Long
Dim s As String
s = String$(MAX_PATH, 0)
length = GetLongPathName(Filename, s, Len(s))
If (length And Err = 0) Then GetLongPath = Left$(s, length)
End Function
Private Sub Command1_Click()
MsgBox GetLongPath("G:\PROJEC~1\BILLIN~1\BILLIN~1\Client\CLIENT~1.EXE")
End Sub
Labels:
File-And-Folder
Subscribe to:
Posts
(
Atom
)