Solved

Alignment in MDI (StatusBar and PictureBox)

Posted on 2001-07-03
9
336 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 51

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
Technology Partners: 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

756 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