Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1920 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     .NET and MSSQL :

[VB.NET]Mouse click(coords problems)

Thread title: [VB.NET]Mouse click(coords problems)
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
11-11-2007, 12:48 AM
#10
masfenix is offline masfenix
Status: Member
Join date: Mar 2006
Location: t.dot canaada
Expertise:
Software:
 
Posts: 182
iTrader: 1 / 100%
 

masfenix has a little shameless behaviour in the past

Send a message via AIM to masfenix

  Old

Code:
Public Class frmClicker
 
    Const MOUSEEVENTF_MOVE = &H1

    Private Sub btnPosition_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPosition.Click

        System.Threading.Thread.Sleep(2000)
        txtX.Text = System.Windows.Forms.Cursor.Position.X
        txtY.Text = System.Windows.Forms.Cursor.Position.Y

    End Sub

    Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
       'get the cursor handle
        Me.Cursor = New Cursor(Cursor.Current.Handle)
        Cursor.Position = New Point(Convert.ToInt32(txtX.text), Convert.ToInt32(txty.text))
        

    End Sub
End Class
try using the framework as much as possible. api is good but use it when its absolutely neccessary.

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed