Solved

Alignment in MDI (StatusBar and PictureBox)

Posted on 2001-07-03
9
325 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
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 49

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
 
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now