hi all,
i new for vb.net. i try to disable windows key function using vb.net. But by code only work on mouse click.
so i need help to edit my code.
This my code.
Thanks,
Option Strict On
Imports System.Runtime.InteropServices
Public Class Form1
<DllImport("user32.dll")>
Private Shared Function FindWindow(className As String, windowText As String) As Integer
End Function
<DllImport("user32.dll")>
Private Shared Function EnableWindow(ByVal hWnd As IntPtr, ByVal bEnable As Boolean) As Boolean
End Function
Dim StartButtonhWnd As Integer = 0
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
EnableWindow(CType(StartButtonhWnd, IntPtr), True)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
StartButtonhWnd = FindWindow("Button", "Start")
EnableWindow(CType(StartButtonhWnd, IntPtr), False)
End Sub
End Class