Solved

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

Posted on 1997-11-18
1
275 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Put text in a picture ASP.NET C# 2 73
vb6, excel Run-time error 1004 method 'close' of object 'workbooks' failed 7 80
Spell Check in VB6 13 152
Help me. 3 79
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

752 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