You can use P/Invokes. All you need to do is grab the main windows handle, and invoke "SendMessage" with a mouse click and it will work.
EDIT: Found the sample code:
Code:
<DllImport("user32.dll", CharSet := CharSet.Auto, SetLastError := False)> _
Private Shared Function SendMessage(hWnd As IntPtr, Msg As Integer, wParam As Integer, lParam As Integer) As IntPtr
End Function
<StructLayout(LayoutKind.Explicit)> _
Structure LParamLocation
<FieldOffset(0)> _
Private Number As Integer
<FieldOffset(0)> _
Public X As Short
<FieldOffset(2)> _
Public Y As Short
Public Shared Widening Operator CType(p As LParamLocation) As Integer
Return p.Number
End Operator
End Structure
Private Sub Form1_MouseClick(sender As Object, e As MouseEventArgs)
Dim process = Process.GetProcessesByName("chrome")
Dim points As New LParamLocation()
points.X = CShort(PointToScreen(e.Location).X)
points.Y = CShort(PointToScreen(e.Location).Y)
'MouseLeft down message
SendMessage(process(0).MainWindowHandle, &H201, 0, points)
'MouseLeft up message
SendMessage(process(0).MainWindowHandle, &H202, 0, points)
End Sub
-jD