SetForegroundWindow(Me.Handle)이용한 특정키 사용불가

교교 2014.04.08 20:57:05 *: Imports System.Runtime.InteropServices

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Timer1.Interval = 100
Timer1.Start()
End Sub

<DllImport("user32.dll")> _
Shared Function SetForegroundWindow(ByVal hWnd As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Function

Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
SetForegroundWindow(Me.Handle)
End Sub

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
End
End Sub
End Class

.