Solved

How to get current x, y pixel coordination by API?

Posted on 1997-11-18
1
273 Views
Last Modified: 2012-05-05
On top a grid, when mouse down ,I want use API to
get the x and y measured by pixel not trip. How to
do that?
0
Comment
Question by:xzhang
1 Comment
 
LVL 8

Accepted Solution

by:
mrmick earned 20 total points
ID: 1441391
Set scalemode to vbPixels (3) in forms and pictureboxes.  
When an argument passes a twip mesurement, convert it to pixels with the following statements:

X = X \ Screen.TwipsPerPixelX
Y = Y \ Screen.TwipsPerPixelY

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

770 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