473,394 Members | 1,800 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,394 software developers and data experts.

Custom coordinates

I want to be able to create 2 custom coordinate systems. In one, I want the
origin to be at the center of the form so that there will be 4 quadrants. In
another, I want the origin to be at the left edge of the form halfway between
the top & the bottom. How do I do that? Thank you. David
Jul 7 '06 #1
3 861
Inherit from FORM and override the Location property and modify the
resulting X and Y location based on the form's height and width.

Jul 7 '06 #2

HUH??? I don't understand !!! What are you talking about? VB6 made it so
much easier! Please elaborate. Please include the source code. In one of my
books, I read about scaling & rotation & transformation. Is that what I use?
What is the source code? Thank you. David

"Steven Nagy" wrote:
Inherit from FORM and override the Location property and modify the
resulting X and Y location based on the form's height and width.

Jul 8 '06 #3
Ok first you need to learn about 'Inheritance'. Google for that one.
What you will want to do is create your OWN base form to inherit from
in the future.

By default, when you create a new form, it inherits from
System.Windows.Forms.Form

You then need to create your own location property by over riding the
existing one (another Object Oriented principle) and when you right the
X Y properties, just alter them by +/- VALUE where VALUE is exactly
half the width/height of the form (width for X, height for Y). You can
get those 2 values from teh forms Width and Height properties.

No code for you because I'm not able to write windows apps from this
workstation.

Jul 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Tinus | last post by:
Hello all, I've created a custom control that draws a monthly schedule (using the Draw function in C#). Basically it draws 31 boxes and writes the day number in every box. This works...
4
by: ThunderMusic | last post by:
Hi, I have a borderless form and I try to drag it. When I do it, the form start to jump from position to position even when I don't move the mouse... My formula seems right, but the result is...
9
by: jon | last post by:
Hello, I'm trying to experiment with some javascript to do some custom dragdrop handling. I wish to use the onMouseDown event to trigger the start of my drag, and onMouseup for a potentential...
3
by: Sebastian M. Rouaiha | last post by:
Hi. I have a problem. When drawing into a graphics context I sometimes get access violation exceptions and I can't figure out why. It seems to have to do with the use of custom dashes. 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: 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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.