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

How do I link up arrows with rectangles while moving?

P: 1
I am trying to create a kind of network ( rectangles and arrows for showing links between 2 rectangles) in vb.net. When I move rectangle, arrow must move too- how can I realize it?
I create arrows with grp.Graphics.DrawLine, but then I can't call it for edit it's coordinates.
I am drawing on a Panel, Windows Forms.
Thanks in advance!!!
Apr 17 '15 #1
Share this Question
Share on Google+
1 Reply


P: 3
Store the parameters of the rectangle (box) such as how many arrows are connected to the box, what are their ids, where are each arrows pointing to. This way when you move the rectangle also check if there are any connected arrows to the box. If they are change their coordinates accordingly to the box coordinates. Change only the coords that are connected to the box and not of the other end.
Apr 21 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.