Solved

SetcursorPos API

Posted on 1997-04-04
1
657 Views
Last Modified: 2008-03-06
The SetCursorPos API sets the current cursor to a specific point on the screen as specified in its arguments: the X and Y logical coordinates. Does anyone know of an win32API that would set my cursor to the first position or any position within a textbox control that I desire it to be set to, In other words, is there an API that would take the POSITION within a textbox as an argument rather than logical co-ordinates?
SC.
0
Comment
Question by:schhaya
1 Comment
 
LVL 2

Accepted Solution

by:
weekee earned 100 total points
Comment Utility

I don't think that there is a API to do that but you can still do it with the setCursorPos API. Simply make use of the textbox top and left property. And taking consideration of the width and height of the textbox, you can do the neccessary calculation of the x y with respect to the textbox and use this calculated value and pass it to the API,

For example :

    setCursorPos(form.hdc, textbox.left,textbox.top)

i wonder if i pass the parameter correctly but that is the basic idea for displaying the cursor at the 0,0 pos of the textbox.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now