|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Is setting Bounds Property the same as setting Size and Location?Is there a difference between setting Control.Bounds Property (or using
Control.SetBoundsCore ) and setting the Location and the Size properties? Is it simply that you can set them all at once rather that in two steps or is there more to it than that? Thanks On Nov 26, 12:27 pm, "Academia" <academiaNOS***@a-znet.com> wrote: The big difference I can see from the documentation, is that Bounds> Is there a difference between setting Control.Bounds Property (or using > Control.SetBoundsCore ) and setting the Location and the Size properties? > > Is it simply that you can set them all at once rather that in two steps or > is there more to it than that? > > Thanks sets the location relative to the non-client area. In other words, it doesn't take into consideration the width of borders, etc, etc. So, you would need to make sure that you were accounting for non-client areas in the coordinates. -- Tom Shelton
Show quote
Hide quote
"Tom Shelton" <tom_shel***@comcast.net> wrote in message Isn't that the same as what the Size property does?news:c9d700c7-dc78-4cfc-9818-3bb63caafc90@b40g2000prf.googlegroups.com... > On Nov 26, 12:27 pm, "Academia" <academiaNOS***@a-znet.com> wrote: >> Is there a difference between setting Control.Bounds Property (or using >> Control.SetBoundsCore ) and setting the Location and the Size properties? >> >> Is it simply that you can set them all at once rather that in two steps >> or >> is there more to it than that? >> >> Thanks > > The big difference I can see from the documentation, is that Bounds > sets the location relative to the non-client area. In other words, it > doesn't take into consideration the width of borders, etc, etc. So, > you would need to make sure that you were accounting for non-client > areas in the coordinates. > > -- > Tom Shelton Thanks
Show quote
Hide quote
"Academia" <academiaNOSPAM@a-znet.com> schrieb Bounds is equal to x,y, width, height. Size is equal to width, height. > > "Tom Shelton" <tom_shel***@comcast.net> wrote in message > news:c9d700c7-dc78-4cfc-9818-3bb63caafc90@b40g2000prf.googlegroups.com... > > On Nov 26, 12:27 pm, "Academia" <academiaNOS***@a-znet.com> wrote: > > > Is there a difference between setting Control.Bounds Property > > > (or using Control.SetBoundsCore ) and setting the Location and > > > the Size properties? > > > > > > Is it simply that you can set them all at once rather that in > > > two steps or > > > is there more to it than that? > > > > > > Thanks > > > > The big difference I can see from the documentation, is that > > Bounds sets the location relative to the non-client area. In > > other words, it doesn't take into consideration the width of > > borders, etc, etc. So, you would need to make sure that you were > > accounting for non-client areas in the coordinates. > > > > -- > > Tom Shelton > > Isn't that the same as what the Size property does? Location is equal to x, y. Equal means identical, as the IL code says. Armin
Show quote
Hide quote
On Nov 27, 12:48 am, "Academia" <academiaNOS***@a-znet.com> wrote: I just did an experiement, and though the documentation seems to> "Tom Shelton" <tom_shel***@comcast.net> wrote in message > > news:c9d700c7-dc78-4cfc-9818-3bb63caafc90@b40g2000prf.googlegroups.com... > > > > > > > On Nov 26, 12:27 pm, "Academia" <academiaNOS***@a-znet.com> wrote: > >> Is there a difference between setting Control.Bounds Property (or using > >> Control.SetBoundsCore ) and setting the Location and the Size properties? > > >> Is it simply that you can set them all at once rather that in two steps > >> or > >> is there more to it than that? > > >> Thanks > > > The big difference I can see from the documentation, is that Bounds > > sets the location relative to the non-client area. In other words, it > > doesn't take into consideration the width of borders, etc, etc. So, > > you would need to make sure that you were accounting for non-client > > areas in the coordinates. > > > -- > > Tom Shelton > > Isn't that the same as what the Size property does? > > Thanks- Hide quoted text - > > - Show quoted text - indicate that setting Bounds does not take in to consideration the client area of the form, that seems not to be true. It appears that using bounds to set size and location is identicle to setting them individually. -- Tom Shelton
Show quote
Hide quote
"Tom Shelton" <tom_shel***@comcast.net> wrote in message I asked because I found the Bounds documentation confusing and was looking news:adf9ad39-5ab7-4054-9d7f-281226ea7b77@a35g2000prf.googlegroups.com... > On Nov 27, 12:48 am, "Academia" <academiaNOS***@a-znet.com> wrote: >> "Tom Shelton" <tom_shel***@comcast.net> wrote in message >> >> news:c9d700c7-dc78-4cfc-9818-3bb63caafc90@b40g2000prf.googlegroups.com... >> >> >> >> >> >> > On Nov 26, 12:27 pm, "Academia" <academiaNOS***@a-znet.com> wrote: >> >> Is there a difference between setting Control.Bounds Property (or >> >> using >> >> Control.SetBoundsCore ) and setting the Location and the Size >> >> properties? >> >> >> Is it simply that you can set them all at once rather that in two >> >> steps >> >> or >> >> is there more to it than that? >> >> >> Thanks >> >> > The big difference I can see from the documentation, is that Bounds >> > sets the location relative to the non-client area. In other words, it >> > doesn't take into consideration the width of borders, etc, etc. So, >> > you would need to make sure that you were accounting for non-client >> > areas in the coordinates. >> >> > -- >> > Tom Shelton >> >> Isn't that the same as what the Size property does? >> >> Thanks- Hide quoted text - >> >> - Show quoted text - > > I just did an experiement, and though the documentation seems to > indicate that setting Bounds does not take in to consideration the > client area of the form, that seems not to be true. It appears that > using bounds to set size and location is identicle to setting them > individually. > > -- > Tom Shelton for someone like yourself who has more insight into DotNet to comment. Thanks
Disecting Strings
Removing reference type members from a generic list clone vs2008 or not Fastest way to import large fixed width file into a DataTable XML Deserializer problem Multithreading Invoke Workaround Integer array from vb to c function References to different versions of MS Outlook in a VB.NET application Convert code line to VB Bug in VWD 2008 Express? |
|||||||||||||||||||||||