Link to home
Start Free TrialLog in
Avatar of kpnkpn
kpnkpn

asked on

Alignment in MDI (StatusBar and PictureBox)

I have some trouble with the alignment of a statusbar and a picturebox that I have in an mdiform. In Visual Basic I place the statusbar below the picturebox. The are both aligned 'bottom'. When I run the program and do

statusbar.visible = false
statusbar.visible = true

I get the statusbar above the picturebox. How can I get it back below the picturebox?
Avatar of nigelrowe
nigelrowe

Have you tried the ZOrder property?
Don't bother with that it doesn't work. Thats an interesting problem, I see what you mean. Still working on it.
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Bingo!!!!

Send the Picture Box to the back in design time...

.Format
..Order
...Send to Back
ryancys, thanks for your sportsmanship
Best regards, Nigel

P.S.
Oh yes, the reason it didn't work for me was because I used...
StatusBar1.ZOrder = 0

which threw an error. In any case either of the two solutions works.
Avatar of kpnkpn

ASKER

Hi!

Thankyou very much for the answers. Now I have another problem. Can I accept more than one comment as answer? It's because nigelrowe asked me if I had tried the zorder(). In fact I had. But I didn't get it to work. Then ryancys posted an example and that helped me. Hm... Which answer do you want me to accept?
It depends on you. Personally I would use...

.Format
..Order
...Send to Back
In design time, as this eliminates a line of code being run during runtime.

Yes there is a way to split the points, but I'm not sure how to do it, perhaps ryancys can shed some light on this.

Regards
kpnkpn, to split the points, you need to post a zero point question in community support https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt and give the url of this question and the distribution of points you require. Say 10 points each (or whatever you feel is appropriate).
Avatar of kpnkpn

ASKER

No way I split the points that silly way. A waste of time. I give the points to the comment that helped me.