C# -- Determining the dimensions of the users screen that a form is launched on and making the forms dimensions 1/4 the screen area.
Posted on 2005-04-04
Hi I am fairly new to programming so if you could show me by code example and very plain english of what it is doing I would appreciate it very much. Anyway...
I was wondering. I am writing an app where I want to launch a form with the width of the form 1/2 the width of the users screen (pixels I guess) and 1/2 the height for a total of exactly 1/4 the surface area of the computer screen the app is run on.
Also how could I (what would the code look like if I wanted to launch it at a specific position.
Lastly, how can I (in code) tell if there are X number of instances of a particular form so that if let's say I had 9 instances instead of 4 (example of 1/2 dimension and 1/4 surface area example) I could have the the nine forms tiled (3X3) so that the width and hight of each form would be reset (if user presses a button of course :) ) to 1/3 with each form taking up 1/9th of screen size (resolution/pixels whatever)
event buttton press
how many instances of a form are there...
equally size each by users screen size...
tile them approprietly etc...
The example of stuff I am trying to figure out above is to tile windows of a financial charting application etc.
Please allow me to express my huge thanks in advance for your efforts.