470,604 Members | 2,121 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,604 developers. It's quick & easy.

How to programmably move a GroupBox in C#

There are no public events such as mouse down, mouse move and mouse up for
GroupBox in C#. It is possible to move a GroupBox programmably inC#?

Thanks

Minfu

Nov 17 '05 #1
5 5476
You can call the SetBounds() operation on every control to set the size and
the location of any control.

Eg to move the groupbox to Location(100, 100)

GroupBox groupBox = new GroupBox();
groupBox.SetBounds(100, 100, 0, 0, BoundsSpecified.Location);

Gabriel Lozano-MorŠn
Real Software
Nov 17 '05 #2
http://msdn.microsoft.com/library/en...asp?frame=true
"Minfu Lu" <Mi*****@discussions.microsoft.com> schrieb im Newsbeitrag
news:41**********************************@microsof t.com...
There are no public events such as mouse down, mouse move and mouse up for
GroupBox in C#. It is possible to move a GroupBox programmably inC#?

Thanks

Minfu

Nov 17 '05 #3
Or off course set the Location, Left, Top properties but for some reason I
think that I am not understanding the question very well because you
mentioned the mouse events?

Gabriel Lozano-MorŠn

"Gabriel Lozano-MorŠn" <ga************@no-spam-thx.org> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
You can call the SetBounds() operation on every control to set the size
and the location of any control.

Eg to move the groupbox to Location(100, 100)

GroupBox groupBox = new GroupBox();
groupBox.SetBounds(100, 100, 0, 0, BoundsSpecified.Location);

Gabriel Lozano-MorŠn
Real Software

Nov 17 '05 #4
I mean to use mouse down , move up events to move it.

"Gabriel Lozano-Mor√°n" wrote:
Or off course set the Location, Left, Top properties but for some reason I
think that I am not understanding the question very well because you
mentioned the mouse events?

Gabriel Lozano-Mor√°n

"Gabriel Lozano-Mor√°n" <ga************@no-spam-thx.org> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
You can call the SetBounds() operation on every control to set the size
and the location of any control.

Eg to move the groupbox to Location(100, 100)

GroupBox groupBox = new GroupBox();
groupBox.SetBounds(100, 100, 0, 0, BoundsSpecified.Location);

Gabriel Lozano-Mor√°n
Real Software


Nov 17 '05 #5
>I mean to use mouse down , move up events to move it.

I think I know what you mean now. These events are marked with the Browsable
attribute set to false this means that you will NOT see them in the property
window. This however does not mean that you cannot use the events in code.

this.groupBox.MouseDown += new MouseEventHandler(groupBox_MouseDown);

Gabriel Lozano-MorŠn
Nov 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Mr.Clean | last post: by
1 post views Thread by Bob C. | last post: by
reply views Thread by Mark Johnson | last post: by
1 post views Thread by MikeY | last post: by
4 posts views Thread by TJS | last post: by
8 posts views Thread by johnmmcparland | last post: by
4 posts views Thread by shilpichaudhry | last post: by
8 posts views Thread by Steve | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.