Results 1 to 10 of 10

Thread: vb6: Custom Control stay s not in front

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2003
    Posts
    8

    Question vb6: Custom Control stay s not in front

    I've build an custom control depending on the MSHFlexgrid the control doesnt stay in front of other controls and stops painting when a frame end is reached. How can i solve this?

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    What do you mean by "stops painting when a frame end is reached". If you mean that the flexgrid is inside a frame and you can't see the whole flexgrid then you'll either need to reposition the flexgrid or make the frame bigger.

  3. #3
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    And if you can't get it to go in front of other controls, then that means that you probably have it set as Windowless.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2003
    Posts
    8
    The control must go beyond the frame borders just like a combobox (Thats what my control is)
    The control is not windowless because it have window child controls.
    Last edited by stalk; Jul 5th, 2003 at 03:32 PM.

  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2003
    Posts
    8
    Public Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As Long) As Long
    did the ZOrder thing but the control still can't paint over frame borders

  6. #6

    Thread Starter
    New Member
    Join Date
    Jul 2003
    Posts
    8
    Somebody?

  7. #7
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    You will probably need to use SetParent to change the parent window to the desktop, then make the window always on top. Theres a bunch of examples floating around in here. Search it up.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  8. #8

    Thread Starter
    New Member
    Join Date
    Jul 2003
    Posts
    8
    How do i find the forms hwnd where the controls frame is placed in code? So i can use setparent.

  9. #9

    Thread Starter
    New Member
    Join Date
    Jul 2003
    Posts
    8
    SetParent is not an option because the control must hold the frame as his parent. (When the frame.visible = false is set the control must diappear to) The only thing the control should do is paint over the frames border.

  10. #10

    Thread Starter
    New Member
    Join Date
    Jul 2003
    Posts
    8
    it must work on nt 4.0, 2000 and XP.
    I'm developing on XP.

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