Solved

SetcursorPos API

Posted on 1997-04-04
1
683 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
ID: 1425068

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

685 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