Home All Groups Group Topic Archive Search About
Author
7 Jul 2006 1:53 AM
pcnerd
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

Author
7 Jul 2006 6:16 AM
Steven Nagy
Inherit from FORM and override the Location property and modify the
resulting X and Y location based on the form's height and width.
Author
8 Jul 2006 1:22 PM
pcnerd
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

Show quoteHide quote
"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.
>
>
Author
11 Jul 2006 6:04 AM
Steven Nagy
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.