-
Hi everyone,
I was wondering if there is an event which handles like a 'form.move'. I'd like to make one form 'dock' to another form, but
- I don't know when Form1 is moving/moved, so:
- I ALSO don't know when to move Form2 by code...
Does anyone has a solution to this problem?
Thanx in advance!
-
<?>
If you are docking forms you might want to look at the API for SetWindowPosition...then you just call your forms to their preordained positions.
http://www.vbapi.com/ref/s/setwindowpos.html
[Edited by HeSaidJoe on 08-01-2000 at 06:12 PM]
-
Thanx, but I think this piece of code is not doing the thing I want. I'll explain:
I Have A Form, "Form1" with properties:
Width=1000
Left=2000
I have another Form, "Form2" with properties:
Width=1000
Left=Form1.left + form1.Width
Now, if I move "Form1", "Form2" aslo has to move!
But since there is no event on moving Form1, this isn't possible!!
Solution?
Anyone?
-
<?>
Code:
'form 1 code
Private Sub Form_Load()
Dim x As Integer, y As Integer, _
z As Integer
x = 100
y = 200
z = 3000
Form1.Width = z
Form2.Width = z
Form1.Left = y
Form2.Left = (y + Form1.Width)
Form1.Top = x
Form2.Top = x
Load Form2
Form2.Show
End Sub
'form 2 code
'command button on form2
Private Sub Command1_Click()
Form1.Move (4000)
Form2.Move (4000 + Form1.Width)
End Sub