Results 1 to 7 of 7

Thread: A label higher than frame in ZOrder

  1. #1
    Guest
    If I have a label on my form and then draw a frame over that label, the label will be invisible, because it will be under the frame; right? Now how can make it visible????? I want the label to be on top of the ZOrder (and I don't want the frame to contain the label)
    HYKWIM

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    The problem is - labels are windowless controls. This means that they can only draw onto their container, in this case your form. The only way it can draw onto the frame is if the frame was its container.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Uh....
    I think frames have up most ZOrder, except for maybe timers, other invisible shiyat(funny word).

  4. #4
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    461
    You can't... well at least not in any way I know of.

    The whole point of having a frame is that it is the topmost object unless you cover it with another frame.

    What reason could you possibly want to display a label OVER a frame but not have it part of the frame?

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Is it you don't want anything to sit on the frame or some reason the label shouldn't?
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  6. #6
    JBVB123
    Guest
    This is a late reply, but for future reference I believe you can place the label in a PictureBox, then place the PictureBox on top of the frame. Make the PictureBox the same size as the label.

  7. #7
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    Well, since this was at the top of the list, even though the subject started so long ago, here's my two cents, in
    case anybody's listining.

    If the label doesn't need to be seen all the time, whenever it does need to be seen, the frame control
    could be triggered to visible = false. Then when the label doesn't need to be seen, the frame could be set back to visible = true.

    Just for a test, I placed a label on a form, then covered it with a frame. I then made a command1 buttun, then placed this code into its click procedure:

    Private Sub Command1_Click()
    Select Case Frame1.Visible
    • Case True
      Frame1.Visible = False
      Case False
      Frame1.Visible = True
    End Select
    End Sub

    :Then, when I want to see the label, I click the button. And when I want to hide the label, I Unclick it.

    Of course, the label could be placed inside a second frame, and that could be above the first frame.

    Just a thought.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width