[RESOLVED] Moving one PictureBox on top of another
I load three PictureBoxes (Win1, Win2 and Win3) onto one form.
Win1 is large and the other two are small.
I can then draw on Win1.
I can then use .TOP, .HEIGHT, .BOTTOM and .WIDTH to place Win2 on top of Win1 and print on it.
I can then use .TOP, .HEIGHT, .BOTTOM and .WIDTH to move Win2 back to it's original place and size.
I can then use .TOP, .HEIGHT, .BOTTOM and .WIDTH to place Win3 on top of Win1 and draw and print on it.
Next I would like to place Win2 on top of Win3 and again print on it.
But, when I use .TOP, .HEIGHT, .BOTTOM and .WIDTH to place Win2 on top of Win3 I can't see it.
It is again on top of Win2 and I have to move Win3 before I can see it.
How can I see Win2 without moving Win3?
Re: Moving one PictureBox on top of another
Jerry
One quick way might be ZOrder, as in
If that doesn't do the trick, perhaps you could post some code and a screenshot
Spoo
5 Attachment(s)
Re: Moving one PictureBox on top of another
Jerry
This sequence seems to confirm my thoughts
Code:
Sub Command2_click()
nnJerry = nnJerry + 1
Select Case nnJerry
Case 1
With Win2
.Left = 1000
.Top = 1200
.Height = 1500
End With
Case 2
With Win2
.Left = 3000
.Top = 1000
.Height = 500
End With
Case 3
With Win3
.Left = 1000
.Top = 1200
.Height = 1500
End With
Case 4
With Win2
.Left = 900
.Top = 1200
.Height = 1000
End With
Case 5
With Win2
.ZOrder 0
End With
End Select
End Sub
0. Initial
Attachment 153273
1. Move Win2
Attachment 153275
2. Move Win2 back
Attachment 153273
3. Move Win3
Attachment 153277
4. Move Win2 .. without ZOrder .. can't see it
.. well, can't see most of it .. it appears to be "behind" Win3
Attachment 153283
5. Set ZOrder on Win2 .. now can see all of it
Attachment 153285
HTH
Spoo
Resolved Re: Moving one PictureBox on top of another
Spoo
That solution did what I wanted. Thank You.
Jerry900
Re: [RESOLVED] Moving one PictureBox on top of another