Results 1 to 8 of 8

Thread: [2005] Form Always on top but not covering taskbar

  1. #1

    Thread Starter
    Fanatic Member TokersBall_CDXX's Avatar
    Join Date
    Mar 2003
    Location
    America
    Posts
    571

    [2005] Form Always on top but not covering taskbar

    Tried various methods from using setwindowpos to insert after the taskbar's handle to using setwindowpos to set my form always ontop and then the taskbar...as well as setting the form's property itself to always on top.

    I cannot seem to find a way to set my form always on top but always behind the taskbar... (this is for a notification type software where it will need to raise up and display something from behind the taskbar, then return back to its origional position when complete).


    any ideas?
    Build your own personalized flash based chat room for your webpage for FREE! http://www.4computerheaven.com

  2. #2
    Lively Member
    Join Date
    Dec 2005
    Location
    In front of my pc
    Posts
    78

    Re: [2005] Form Always on top but not covering taskbar

    This happens because the form is not allowed to be on top of the taskbar. Go to your taskbar, rightclick on it and select properties, there's a checkbox with the title "Always on top", uncheck it, and your form will get on top of the taskbar, simple as that!

    [sarcasm mode]First time in my life I see Windows doing what it's supposed to do... [/sarcasm mode]

  3. #3

    Thread Starter
    Fanatic Member TokersBall_CDXX's Avatar
    Join Date
    Mar 2003
    Location
    America
    Posts
    571

    Re: [2005] Form Always on top but not covering taskbar

    I suspect you mis understood what I requested.


    I want my form to stay UNDER the task bar (not on top of it)
    but on top of all other windows.
    Build your own personalized flash based chat room for your webpage for FREE! http://www.4computerheaven.com

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] Form Always on top but not covering taskbar

    did you set the TopMost property of the form to true?

  5. #5

    Thread Starter
    Fanatic Member TokersBall_CDXX's Avatar
    Join Date
    Mar 2003
    Location
    America
    Posts
    571

    Re: [2005] Form Always on top but not covering taskbar

    Yes Kleinma,


    on startup i set the form in the lower left so that only the title (should) be visible and set the form to topmost (tried all the various ways including setting the form's property to topmost). how ever the form stays on top of the taskbar too (First Attachment).


    I want it to be like the second attachment.
    the form is about 600 pixels tall and scrolls up when you hover the mouse over it's title or the form itself.
    Attached Images Attached Images   
    Last edited by TokersBall_CDXX; Jul 19th, 2006 at 01:33 PM.
    Build your own personalized flash based chat room for your webpage for FREE! http://www.4computerheaven.com

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] Form Always on top but not covering taskbar

    i think the problem lies in the case when you have 2 TOPMOST windows.

    TOPMOST window 1 being your app, and TOPMOST windows 2 being the taskbar.

    when you have 2 topmost windows, they sit on all other windows, but they exchange focus when they are activated. Also you can't (at least not that I know of) specify for a window to be topmost but ALWAYS be behind another topmost. That would make it rather odd to work with that window, unless it did something like what you are after (scrolling the form up into view) but since keeping it out of view until needed is sort of like a hack(ish) way of doing things.. I don't think there is anything you can do about it.

    I got curious about this so I made an example of an alternative that actually moves AND shrinks the form to keep it out of view.. it is topmost on all windows.. but shrinks instead of needing to go behind the taskbar...

    let me know what you think.. its not perfect.. but should get you on your way.
    Attached Files Attached Files

  7. #7
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [2005] Form Always on top but not covering taskbar

    Try this, it'll make the form 'all screen' size thus it should inculde the taskbar and be ontop of it
    VB Code:
    1. Me.Size = Screen.PrimaryScreen.Bounds.Size
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  8. #8

    Thread Starter
    Fanatic Member TokersBall_CDXX's Avatar
    Join Date
    Mar 2003
    Location
    America
    Posts
    571

    Re: [2005] Form Always on top but not covering taskbar

    Quote Originally Posted by kleinma
    i think the problem lies in the case when you have 2 TOPMOST windows.

    TOPMOST window 1 being your app, and TOPMOST windows 2 being the taskbar.

    when you have 2 topmost windows, they sit on all other windows, but they exchange focus when they are activated. Also you can't (at least not that I know of) specify for a window to be topmost but ALWAYS be behind another topmost. That would make it rather odd to work with that window, unless it did something like what you are after (scrolling the form up into view) but since keeping it out of view until needed is sort of like a hack(ish) way of doing things.. I don't think there is anything you can do about it.

    I got curious about this so I made an example of an alternative that actually moves AND shrinks the form to keep it out of view.. it is topmost on all windows.. but shrinks instead of needing to go behind the taskbar...

    let me know what you think.. its not perfect.. but should get you on your way.

    yes this is the only work around I was able to come up with as well (which is how the form has been from the start).

    how ever I'm not quite satisified with the effects and the constant recalculation for form growth/shrinkage if the form needs to change dimensions.


    thanks anyways though...
    Build your own personalized flash based chat room for your webpage for FREE! http://www.4computerheaven.com

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