Pressing a Button in WIN2000

I am having a problem pressing icons or buttons. Until I went to 2000, my function seemed to work. Here is my current function.

Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal Hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long) As Long

Public Const WM_LBUTTONDOWN = &H201
Public Const WM_LBUTTONUP = &H202

Public Sub HwndIcon(ByVal Icon As Long)
Call SendMessage(Icon, WM_LBUTTONDOWN, 0, 0)
Call SendMessage(Icon, WM_LBUTTONUP, 0, 0)
End Sub
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!