/ Published in: Visual Basic
Using this code snippet we can get the current cursor position in QTP. Dotnet factory is used to get the current cursor position as there is no direct way to get the current cursor position in QTP / Visual Basic
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Dim controlObject Dim currentX Dim currentY Set controlObject = DotNetFactory.CreateInstance("System.Windows.Forms.Control") currentX = controlObject.MousePosition.X currentY = controlObject.MousePosition.Y