By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

move control WITHIN a panel

P: n/a
BlankI'm new to VB.NET and OOP and have been reading and surfing the web in
an attempt to learn and understand. At this point I'm spinning my wheels and
wasting time. I want to be able to move a control1 around on a panel1, which
I am using as a design surface on a form. I can't find examples of how to
MOVE an *entire control* WITHIN the same container (i.e. panel, form) at
runtime. How would this be done using drag and drop? Should I use
mousedown/move/up events instead? If yes, how? Once I get over this hurdle I
want to use a line control (I'll have to create it) to intelligently connect
2 controls. Then, when I move any of the connected controls I need the
connections to remain intact. Any ideas on how to do this?

Many, many thanks in advance.

Nancy
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
do you mean MDI (Multiple Document Interface)?
if so, check out the IsMdiContainer and MdiParent properties in the Form
class.

hope this helps

Dominique

"Nancy" <np***@systek.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
BlankI'm new to VB.NET and OOP and have been reading and surfing the web in an attempt to learn and understand. At this point I'm spinning my wheels and wasting time. I want to be able to move a control1 around on a panel1, which I am using as a design surface on a form. I can't find examples of how to
MOVE an *entire control* WITHIN the same container (i.e. panel, form) at
runtime. How would this be done using drag and drop? Should I use
mousedown/move/up events instead? If yes, how? Once I get over this hurdle I want to use a line control (I'll have to create it) to intelligently connect 2 controls. Then, when I move any of the connected controls I need the
connections to remain intact. Any ideas on how to do this?

Many, many thanks in advance.

Nancy

Nov 20 '05 #2

P: n/a
On Tue, 20 Jan 2004 17:57:50 -0500, Nancy wrote:
I am using as a design surface on a form. I can't find examples of how to
MOVE an *entire control* WITHIN the same container (i.e. panel, form) at


See if this article will help you:

http://www.bobpowell.net/manipulate_graphics.htm

As for lines drawn between controls (I assume you want something similar to
what Visio does). One possible way would be to have a Shape class. Each
shape would have one or more "connect points". Then you could have a Line
class with properties that indicate the two shapes the line will connect.
In the painting routine, somehow determine which connect points on the
objects to use based on their relative positions and draw the line between
them.

Hope this gives you some ideas.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #3

P: n/a
Thanks Dominique but I wasn't refering to MDI. I'm working with lines and
pictureboxes. If interested, see my response to Chris' suggestion. Nancy
"Dominique Vandensteen" <domi.vds_insert@tralala_tenforce.com> wrote in
message news:Oy**************@TK2MSFTNGP12.phx.gbl...
do you mean MDI (Multiple Document Interface)?
if so, check out the IsMdiContainer and MdiParent properties in the Form
class.

hope this helps

Dominique

"Nancy" <np***@systek.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
BlankI'm new to VB.NET and OOP and have been reading and surfing the web in
an attempt to learn and understand. At this point I'm spinning my wheels

and
wasting time. I want to be able to move a control1 around on a panel1,

which
I am using as a design surface on a form. I can't find examples of how to MOVE an *entire control* WITHIN the same container (i.e. panel, form) at
runtime. How would this be done using drag and drop? Should I use
mousedown/move/up events instead? If yes, how? Once I get over this

hurdle I
want to use a line control (I'll have to create it) to intelligently

connect
2 controls. Then, when I move any of the connected controls I need the
connections to remain intact. Any ideas on how to do this?

Many, many thanks in advance.

Nancy


Nov 20 '05 #4

P: n/a
Thanks for responding Chris.

As for the URL (article), it's helpful but so far I haven't been able to
successfully implement his C code in VB code while trying to figure out what
he's doing. I'm working on it.

Haven't gotten to the shapes work yet but thanks for the good idea!

Nancy
"Chris Dunaway" <dunawayc@_lunchmeat_sbcglobal.net> wrote in message
news:1b****************************@40tude.net...
On Tue, 20 Jan 2004 17:57:50 -0500, Nancy wrote:
I am using as a design surface on a form. I can't find examples of how to MOVE an *entire control* WITHIN the same container (i.e. panel, form) at
See if this article will help you:

http://www.bobpowell.net/manipulate_graphics.htm

As for lines drawn between controls (I assume you want something similar

to what Visio does). One possible way would be to have a Shape class. Each
shape would have one or more "connect points". Then you could have a Line
class with properties that indicate the two shapes the line will connect.
In the painting routine, somehow determine which connect points on the
objects to use based on their relative positions and draw the line between
them.

Hope this gives you some ideas.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.