[Closed] DotNet Form Location?
What is clientsize?
I’ll check it out. If that gives me the interior area of the window, that would be cool.
Edit:
Damnit… :’( hahaha… So Client Size is the interior size… well that’s good to know… welp… back to modify my code again, haha.
Thanks for that!
[i]”…so I am taking the size of the form, taking off 20 from the width, and 40 from the height, then adding back to the X,Y pos to…”
[/i]how could you know the real size of the border and the title bar? they are defined by the system settings, and there is no easy way to get it.
So… this worked great for the freeform menu I have going.
But is there a way to say, form.ClientSize.Width is = to number?
I have spinners, that change the forms width/height in realtime. Then I use the form as a area to take a screengrab with.
But if the user puts in 512×512, its using the whole windows size, and not the ClientSize. So if I could modify the clientsize with the spinner instead of the form size, that would give them what they would be expecting, and match my other freeform menu, which just screens the clientsize width/height.
no,no,no… you still have to modify the real size. The client size can be used to get (not really) the size of the border and the title bar.
“how could you know the real size of the border and the title bar? they are defined by the system settings, and there is no easy way to get it[i]…”
[/i]… but it’s possible.
Hm… yeah… .that’s what I thought…
That’s what I was doing… but it was starting to get hairy. I was trying to figure out where to add/subtract from in order for the final image to be output at the W,H values in the spinner, with the position in the right spot as well.
Right now, from my tests on win 7, the height changes by +34 between the clientsize and size, and the width is +16.
So I guess I will have to set the size to what the spinner says + those numbers, then use the clientsize for the actual screengrab area? :surprised
http://forums.cgsociety.org/showpost.php?p=6266095&postcount=446
here is how to get the area that you need.
Awesome stuff :). Definately could use this for future projects.
You’re the man.