Hi Guys and Gals,
I have a couple of problems related to centering forms on top of each other.
I have a winforms app that has a status form that I want to popup in the
center of my main form when some processing is taking place. In order to do
this I need to find out the following information:
1. Where is my main form on the (current) screen in relation to the screen's
0,0 point? Once I have the location I can work out where the sub form needs
to go easily.
2. How do I set the coordinates of the sub form in relation to the current
screen's 0,0 point?
3. What is the height of the title-bar. My status form has a blank text
property and as a result no title bar. Stupidly, the .net framework then
resets the location of the controls and shifts them all up by the height of
the title bar. But it leaves the form the same size. Which means that the
form now has a big empty patch at the bottom of it. Apparently I need to
programmatically adjust the height of my form to allow for this, hence my
question.
Regards
Greg