473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 5752
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mr.Clean | last post by:
I am trying to mimic a Windows GroupBox control using fieldset, label and radio buttons. The problem lies in that I can not correctly do the radio buttons relative to the groupbox and the label...
1
by: Bob C. | last post by:
Hi All, I placed a GroupBox on form. I am doing some drawing on groupbox. I dont want to get GroupBox's background erased while i call myGroupbox.Invalidate(). How can i stop erasing the...
0
by: Mark Johnson | last post by:
Sometimes Controls that have been added to a GroupBox do not show up. What I am doing : 1) I am not using the designer, but create all the Controls per hand: groupBoxProdukt_01 = new...
0
by: Renee | last post by:
Hi there, does any one know how to create context sensitive help for Groupbox control with HelpProvider class? I can create context sensitive help for any control easily except for Groupbox. ...
1
by: MikeY | last post by:
I'm trying to find a way for changing the thickness of the groupbox borders. I've searched on this site but can't seem to find anything of this subject. Does anyone have a suggestion. Thanks in...
4
by: TJS | last post by:
I get this error at time of compiling my class code what's missing ?? =================== error ============================= Me.groupBox1 = New GroupBox ~~~~~~~~~~~~~ C:\Documents and...
8
by: johnmmcparland | last post by:
Hi all, my program is trying to add group boxes with radio buttons at run time. While at one point it was able to draw the group boxes without the radio buttons, now it encounters problems just...
4
by: shilpichaudhry | last post by:
Hi: I need to have controls in groupBox, which should not be clipped as per the size of the group box. so if they are longer, the control like a text box should appear (unclipped) Thanks,...
8
by: Steve | last post by:
Hi All Is there a way to change the colour of a Groupbox border in VB.net 2005 I want to change it to white Can it be done in the onpaint event? Regards Steve
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.