Solved

Alignment in MDI (StatusBar and PictureBox)

Posted on 2001-07-03
9
340 Views
Last Modified: 2012-06-21
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?
0
Comment
Question by:kpnkpn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 3

Expert Comment

by:nigelrowe
ID: 6248469
Have you tried the ZOrder property?
0
 
LVL 3

Expert Comment

by:nigelrowe
ID: 6248495
Don't bother with that it doesn't work. Thats an interesting problem, I see what you mean. Still working on it.
0
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 20 total points
ID: 6248503
Hi kpnkpn,

nigelrowe have the credit.

Here is the sample:

Private Sub status_Click(Index As Integer)
    If Index = 0 Then 'Show Status Bar
        StatusBar1.Visible = True
    Else 'Hide Status Bar
        StatusBar1.Visible = False
    End If
    StatusBar1.ZOrder 0
End Sub
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:nigelrowe
ID: 6248504
Bingo!!!!

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

.Format
..Order
...Send to Back
0
 
LVL 3

Expert Comment

by:nigelrowe
ID: 6248516
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.
0
 

Author Comment

by:kpnkpn
ID: 6248689
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?
0
 
LVL 3

Expert Comment

by:nigelrowe
ID: 6248770
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
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6248789
kpnkpn, to split the points, you need to post a zero point question in community support http://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).
0
 

Author Comment

by:kpnkpn
ID: 6249581
No way I split the points that silly way. A waste of time. I give the points to the comment that helped me.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question