|
-
Aug 1st, 2000, 05:06 PM
#1
Thread Starter
New Member
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!
-
Aug 1st, 2000, 05:09 PM
#2
_______
<?>
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]
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Aug 1st, 2000, 05:30 PM
#3
Thread Starter
New Member
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?
-
Aug 1st, 2000, 06:09 PM
#4
_______
<?>
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
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|