Il codice che hai postato è per VB6. Per VB.NET la dichiarazione è differente:
.codice:Public Declare Function GetCursorPos Lib "user32" (ByRef lpPoint As System.Drawing.Point) As Boolean 'Esempio Public Sub VisualizzaCoordinate() Dim pt As System.Drawing.Point If GetCursorPos(pt) Then MessageBox.Show("Coordinate mouse: " + pt.ToString(),"Coordinate mouse",MessageBoxButtons.OK,MessageBoxIcon.Information) Else MessageBox.Show("Impossibile ottenere le coordinate del cursore.","Errore",MessageBoxButtons.OK,MessageBoxIcon.Error) End If End Sub

Rispondi quotando
