473,246 Members | 1,291 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,246 software developers and data experts.

move control WITHIN a panel

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

Similar topics

1
by: Jay | last post by:
I need to be able to move a Panel on a windows Form at run time using the mouse. I have tried adding a MouseDown event handler to the Panel and then within the MouseDown handler adding a MouseMove...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
7
by: david | last post by:
I have asked this question before. But it does not work for me. Given radion buttons in the web form design page. What I did is described as follows. A panel control is dragged into the design...
2
by: p_cranfield | last post by:
Hi I am trying to work out how to move controls contained within a user controls at design time using the mouse in the IDE. Consider the following: Project A contains usercontrol1 with...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
3
by: Charles Zhang | last post by:
I want to create a simple server control that does thing like: <Mc:CollapsibleControl TitlePanelID="panel1" BodyPanelID="Panel2"> <asp:Panel ID="panel1"> ... </asp:Panel> <asp:Panel...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.