473,378 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

TranslateTransform the Coordinates in C#

[IMG]C:\Documents and Settings\PIE-13\My Documents\My Pictures\1.bmp[/IMG]

How can i get the coordinates in the linked image manner:

if you are not able to see the imagethen read the text.....

i want that the coordinates of the form in C# which are at the top left corner should come at the point in the middle of form.and when i apply label for checking, it should give [0,0] at that position.
Aug 28 '08 #1
2 4962
Plater
7,872 Expert 4TB
Just do the math, it should be really simple.
Aug 28 '08 #2
cloud255
427 Expert 256MB
You should look at the form's width and height properties some simple math, like plater said, will then give you the midpoint. as far as having the label display its co-ordinates relative to the form's midpoint you only need to basic subtraction of the control's location (when pointing to the client) and the width/height values of form.

From this point it is not too hard to create a method which will place controls on the form when supplied with your 'form midpoint' system.
Aug 28 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Suresh Kumar | last post by:
Hi, In Tkinter, how to convert canvas coordinates to window coordinates? To convert window coordinates to canvas coordinates we are using "canvasx,canvasy". But how to do vice-versa? Iam using a...
2
by: Oldchatterman | last post by:
Hello, in an application I measure a lot of 2d coordinates (x,y) of a pattern. This pattern consists of a set of points on grid with fixed pitches in x and y direction. These coordinates all...
1
by: google | last post by:
Hello, Using ECMA script within an SVG document i'm looking for a way to display an overlay window (rectangle) that follows the mouse cursor an shows some information. It boils down to...
3
by: hclarius | last post by:
Is there any way programmatically to get the values of the PrintDocument's current position (x and y)? Thanks
3
by: steve | last post by:
Hi All I have textboxes within a TableLayoutpanel and I want to be able to position an independant control adjacent to a selected textbox This independent control allows selection of text to...
0
by: standish22 | last post by:
Hey, I'm confused! I have a document that I want to print to a printer. I'm using inches as my units. I got it working w/ Pixels, but my boss told me I have to use Inches instead. My...
1
by: Cainnech | last post by:
Hi all, I've got a bit of a challenge. I've got a script which displays the mouse coodinates if you click on an image. Now I would like to convert these coordinates to pixelnumber. Let me see if I...
0
by: raylopez99 | last post by:
keywords: logical coordinates, page coordinates, world coordinates, device coordinates, physical coordinates, screen coordinates, client coordinates. offset rectangle. WYSIWYG rubber rectangle...
0
by: mingke | last post by:
Hi.... I'm having difficulties with my codes to list coordinates (in my example codes is 4x4 pixel). I tried two different codes and the results are different.Basically, I tried to declare the sub...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.