Simple way of roping forms together so they move together.
ToDo: Complete the Intellisense commentaries.
Status: Alpha Release
Try it out.
Source Code:
FormRopes_Example_Source.zip (188.38K)
Number of downloads: 25
FormRopes DLL(~15Kb):
FormRopesDLL.zip (5.99K)
Number of downloads: 23
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.

Ask A New Question
Reply



MultiQuote




|