Hi All
Someone know?
How to connect two forms - I want to connect one to second - because then it possible the moving a first Form together with a second Form. Similarly like in the Swedish Gimp
I have something like this
in Module
In FormMAIN for Picture1 and Picture4 (arrows)Code:Option Explicit Public NewWidth As Long Public Sub CentreForm(F As Form) NewWidth = FrmMAIN.Width + Form2.Width F.Move (Screen.Width - NewWidth) \ 2, (Screen.Height - F.Height) \ 2 End Sub Public Sub ReturnCentreForm(F As Form) F.Move (Screen.Width - F.Width) \ 2, (Screen.Height - F.Height) \ 2 End Sub
For Form2Code:Private Sub Picture1_Click() Form2.Hide ReturnCentreForm FrmMAIN Picture3.Visible = True Picture2.Visible = False End Sub Private Sub Picture4_Click() CentreForm FrmMAIN Form2.Show Picture2.Visible = True Picture3.Visible = False End Sub
All works nicely, it lacks me this keeping onlyCode:Private Sub Form_Load() CentreForm FrmMAIN Form2.Left = FrmMAIN.Left + FrmMAIN.Width Form2.Top = FrmMAIN.Top Form2.Height = FrmMAIN.Height End Sub Private Sub Form_Unload(Cancel As Integer) ReturnCentreForm FrmMAIN With FrmMAIN .Picture3.Visible = True .Picture2.Visible = False End With End Sub
thanks in advance




Reply With Quote