Solved

Alignment in MDI (StatusBar and PictureBox)

Posted on 2001-07-03
9
329 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 50

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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

770 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