FormRopes

Tie Forms Together

Page 1 of 1

8 Replies - 1955 Views - Last Post: 28 July 2009 - 11:23 AM

#1 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2268
  • View blog
  • Posts: 9,482
  • Joined: 29-May 08

FormRopes

Posted 13 July 2009 - 08:56 PM

My Latest Mini Project: FormRopes

Simple way of roping forms together so they move together.

ToDo: Complete the Intellisense commentaries.
Status: Alpha Release
Try it out.
Source Code: Attached File  FormRopes_Example_Source.zip (188.38K)
Number of downloads: 72
FormRopes DLL(~15Kb): Attached File  FormRopesDLL.zip (5.99K)
Number of downloads: 69

How to setup a form to be rope-able .
AttachRope(Me) -> PullOnRopes(Me) -> RemoveRopes
An Example
Imports FormRopes.FormRope

Public Class GlueWin
 Inherits Form

 Private Sub GlueWin_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
  RemoveRope(Me)
 End Sub

 Private Sub GlueWin_Move(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Move
  PullOnRopes(Me) 
 End Sub

 Public Sub New()
  ' This call is required by the Windows Form Designer.
  InitializeComponent()
  ' Add any initialization after the InitializeComponent() call.
  AttachRope(Me)
 End Sub

 Protected Overrides Sub Finalize()
  RemoveRope(Me)
  MyBase.Finalize()
 End Sub
End Class




How to rope forms together.
Simply
TieRope(FromHere,ToHere) to tie two forms together.
UnTieRope(FromHere,ToHere) to untie.

An Example
Imports FormRopes.FormRope
Public Class Form1
 Dim w As New List(Of GlueWin)


 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  w.Add(New GlueWin)
  w.Add(New GlueWin)
  w.Add(New GlueWin)
  w(0).Location = New Point(0, 0)
  w(0).Show()
  w(1).Show()
  w(2).Show()

 End Sub

 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Glue0_1.Click
  If Me.Glue0_1.Text.StartsWith("G") Then
   TieRope(w(0), w(1))
   Me.Glue0_1.Text = "Deglue 0 1"
  Else
   UnTieRope(w(0), w(1))
   Me.Glue0_1.Text = "Glue 0 1"
  End If

 End Sub


 Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Glue1_2.Click
  If Me.Glue1_2.Text.StartsWith("G") Then
   TieRope(w(1), w(2))
   Me.Glue1_2.Text = "Deglue 1 2"
  Else
   UnTieRope(w(1), w(2))
   Me.Glue1_2.Text = "Glue 1 2"
  End If

 End Sub


 Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Glue0_2.Click
  If Me.Glue0_2.Text.StartsWith("G") Then
   TieRope(w(0), w(2))
   Me.Glue0_2.Text = "Deglue 0 2"
  Else
   UnTieRope(w(0), w(2))
   Me.Glue0_2.Text = "Glue 0 2"
  End If

 End Sub

End Class



Any feedback / comments is welcome.

Is This A Good Question/Topic? 0
  • +

Replies To: FormRopes

#2 NeoTifa  Icon User is offline

  • Whorediot
  • member icon





Reputation: 2736
  • View blog
  • Posts: 15,814
  • Joined: 24-September 08

Re: FormRopes

Posted 14 July 2009 - 08:26 AM

What do you mean by moving forums? Like rearranging them in their order?
Was This Post Helpful? 0
  • +
  • -

#3 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2268
  • View blog
  • Posts: 9,482
  • Joined: 29-May 08

Re: FormRopes

Posted 14 July 2009 - 11:46 AM

FormRopes
When you move a form, any forms roped to it are also moved. Very simple form docking.
Was This Post Helpful? 0
  • +
  • -

#4 NeoTifa  Icon User is offline

  • Whorediot
  • member icon





Reputation: 2736
  • View blog
  • Posts: 15,814
  • Joined: 24-September 08

Re: FormRopes

Posted 14 July 2009 - 12:45 PM

Oh, sorry, I was confused lol. Okay. I wouldn't need it, but it looks like it has the potential of being useful. :\
Was This Post Helpful? 0
  • +
  • -

#5 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2268
  • View blog
  • Posts: 9,482
  • Joined: 29-May 08

Re: FormRopes

Posted 15 July 2009 - 09:12 AM

Updates:
1. Now FormRopes can be tied to mooring points around the other form. E.g. Top-Left, Right-Center ,Bottom-Right, etc.
2. A concept version of Recursive dragging.
Forms: [ 2 ] - [ 0 ] - [ 1 ]
Previous: Dragging [ 0 ] would drag [ 1 ] & [ 2 ]; Dragging [ 2 ] would drag [ 0 ] but not [ 1 ].
Update: Dragging [ 2 ] drags [ 0 ] which drags [ 1 ]

ToDo: Make the Recursive Dragging usable.
Was This Post Helpful? 0
  • +
  • -

#6 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2268
  • View blog
  • Posts: 9,482
  • Joined: 29-May 08

Re: FormRopes

Posted 15 July 2009 - 07:28 PM

Update:
I've done a total rewrite of FormRopes from the bottom up.
The modification of a C# Graph class into a Generic Graph Class in vb.net took a while, buts it was totally worth it.

Now have fully recursive dragging of roped together forms.
A few minor bugs to fix.

SourceCode: Attached File  FormRopes_V2_.zip (71K)
Number of downloads: 69
The DLL: Attached File  FormRopesDLL.zip (8.85K)
Number of downloads: 73 (~22Kb)
ScreemCast: Attached File  rf_mpeg4.zip (233.65K)
Number of downloads: 75
Try it out in your projects, see what you think.

Your Suggestions & Improvement will be evaluated, to be included in thenext version.

This post has been edited by AdamSpeight2008: 15 July 2009 - 08:15 PM

Was This Post Helpful? 0
  • +
  • -

#7 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2268
  • View blog
  • Posts: 9,482
  • Joined: 29-May 08

Re: FormRopes

Posted 17 July 2009 - 08:42 AM

FormRope Update
Fixed: Move on when roping forms together.
Fixed: Minimizing Issue (Minimizing roped form no long make other forms vanish of screen)
Fixed: Most of the redrawing issues.
Added: restoring a minimized form to me re-roped to forms.

Version 1.5.0.0 of v2
DLL:Attached File  FormRopesDLL_1.5.0.0_.zip (9.66K)
Number of downloads: 84
So you can use it in any .net language.
SourceCode:Attached File  FormRopes_V2__1.5.0.0__.zip (242.16K)
Number of downloads: 87 Includes sample application

This post has been edited by AdamSpeight2008: 17 July 2009 - 09:08 AM

Was This Post Helpful? 0
  • +
  • -

#8 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2268
  • View blog
  • Posts: 9,482
  • Joined: 29-May 08

Re: FormRopes

Posted 17 July 2009 - 12:29 PM

Couple of updates
The FormRopes Project now on CodePlex
Codeplex: FormRopes on CodePlex
And there a video of it on you tube.
YouTube: Demostration of FormRopes
Was This Post Helpful? 0
  • +
  • -

#9 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2268
  • View blog
  • Posts: 9,482
  • Joined: 29-May 08

Re: FormRopes

Posted 28 July 2009 - 11:23 AM

Currently rewriting FormRopes to include some new abilities.
A Form can be restricted to stay within certain sides on the screen eg Top, Left, Right,etc
This is then propagated through connected forms.
Added more tiepoints (Internal ones)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1