Results 1 to 8 of 8

Thread: ActiveX ZOrder

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    7

    ActiveX ZOrder

    Hello,

    Anybody know of a way that I can force a control within my usercontrol to the front of the screen?

    Basically I am displaying a listview on click of a button (displays the same as a combobox would). I need to ensure the whole control does not get the highest ZOrder, as the listview will sometimes need to be longer than the associated textbox and button (as a combo), and I do not want the rest of the control (by the button) to overlap any other controls next to it!

    Cheers

    Alec.

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I think you'd just use the listbox's Zorder. Worked for me. I just got done (well mostly) with a combo box control if you want the code I can kick down.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    7
    Sorry for the late response, the code would be fantastic, I am tearing my hair out here!!!

    Cheers,

    Al

  4. #4

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    7
    Fantastic, cheers for the quick response.

    Your code has certainly moved me nearer to completion. However, the associated textbox seems to still have focus (I can't trap the keypress event on the listview anymore). I need to let the user select an item in the list using the up and down arrows, but obviously with the textbox having focus, I haven't managed it!

    Any further ideas?

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You could use SetCapture to make the listbox receive the MouseUp&Down events of the Textbox but that might open a whole new can of worms.

    Actually now that I think abou tit can't you just use the textbox Mouse Events and forward them to the listbox:

    Public Sub Text1_MouseUp(Shift as integer...)
    List1_MouseUp(Shift,Button...)
    End Sub

    Something like that.
    Last edited by Edneeis; Mar 18th, 2002 at 11:26 AM.

  7. #7
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I added that feature to my combo, here you go if you want to see how I did it, although I'm sure there are more ways.

  8. #8

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    7
    That's great, cheers

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