Public Class Form1
Private Declare Function key Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Keys) As Keys
Dim Count As Integer = 0
Private Sub points()
Dim PosX As Integer = Form1.MousePosition.X
Dim PosY As Integer = Form1.MousePosition.Y
Dim Point = "X: " & PosX & " Y: " & PosY
If Count = 1 Then
Label1.Text = Point
ElseIf Count = 2 Then
Label2.Text = Point
ElseIf Count = 3 Then
Label3.Text = Point
ElseIf Count = 4 Then
Label4.Text = Point
End If
End Sub
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
If key(Keys.LButton) Then
Count = Count + 1
points()
End If
If Count = 4 Then
Count = 0
End If
End Sub
End Class
참조:
http://msdn.microsoft.com/ko-kr/library/system.entrypointnotfoundexception(v=vs.100).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1
이 댓글을
VB에서는 대소문자 구분이 없이 함수명/변수명을 사용합니다만,
Win32 API에서는 대소문자의 구분이 분명합니다
이 댓글을