Height of the Taskbar


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Height of the Taskbar

  1. #1
    James Brown Guest

    Height of the Taskbar

    Hi,

    Is there a way to find the height of the taskbar, so that my application can
    hover neatly over it?

    --
    Regards,

    Jamie Brown, Software Developer
    InfoComp Ltd
    E-Mail: james@infocomp.co.uk
    URL: http://www.infocomp.co.uk



  2. #2
    Michael Cole Guest

    Re: Height of the Taskbar


    "James Brown" <james@infocomp.co.uk> wrote in message
    news:3c9f9c2c@10.1.10.29...
    > Hi,
    >
    > Is there a way to find the height of the taskbar, so that my application

    can
    > hover neatly over it?


    Are you referring to the Windows Start Bar here?



  3. #3
    Jason Guest

    Re: Height of the Taskbar


    James,

    You can find the task bar by using the API call:

    FindWindow("Shell_traywnd", "")

    This will return a handle to the task bar. If you then use the GetWindowRect
    call it will return a UDT containing the corners of the task bar, subtract
    bottom from the top and that's your height in pixels.

    "Michael Cole" <michael.cole@hansen.com> wrote:
    >
    >"James Brown" <james@infocomp.co.uk> wrote in message
    >news:3c9f9c2c@10.1.10.29...
    >> Hi,
    >>
    >> Is there a way to find the height of the taskbar, so that my application

    >can
    >> hover neatly over it?

    >
    >Are you referring to the Windows Start Bar here?
    >
    >



  4. #4
    Larry Rebich Guest

    Re: Height of the Taskbar

    James:

    Some years ago I wrote a tip of the month that I call 'Location, Location, Location'. Link to http://www.buygold.net/tips then look for the September 1998 tip of the month. A sample program is provided. From the tip's intro:

    This tip-of-the-month gathers into one module, functions and subroutines that set a window's location, build a form's Window menu, allow users to size a window using standard resolution settings [800x600, etc.] and arrange MDI child forms. If any, the initial window location information is retrieved from the registry. Location information is stored in the registry when the form is unloaded.

    You could use function: TB_FillDesktop32 to fill your form in the desktop work area. Functions are:

    TB_CenterForm Center the form on the screen. Does not consider the task bar.
    TB_CenterForm32 Center the form in the desktop work area, exclude the task bar.
    TB_FillDesktop32 Resize the form to use all the desktop work area.
    TB_CenterFormInMDI Center a child form within its MDI form.
    TB_FillFormInMDI Resize the child form to use all the MDI work area.
    TB_Zone Set a screen zone to be used by the centering routines. Sets the screen quadrant. Use this before loading a non-child form. Then use TB_CenterForm to center the form in the quadrant.
    TB_ZoneFullScreen After using TB_Zone use this to reset the screen quadrant.
    TB_MakeSureOnScreen Make sure the form is fully displayed on the screen. Use this routine during the form load event.
    TB_GetFormInformation Get information about the form's location from the registry. Use this routine in the form load event.
    TB_SaveFormInformation Save form information into the registry. Call this routine in the form unload event.
    TB_GetScreenSize Get the current screen size. Works in conjunction with the following routine.
    TB_SaveScreenSize Save the current screen size. Call during the application unload process. Use TB_GetScreenSize and the current screen sizes to determine if the user has changed screen resolution since the application was last run. If so then use function 'TB_MakeSureOnScreen' to make sure forms fit on the screen.
    TB_GetDesktopWorkArea Used to get the left, top, width and height of the desktop area. Used by the above centering in desktop area routines. It can be used directly.
    TB_DoDock Will dock a window in the Left, Right, Top or Bottom positions of the desktop area. Added 2001/01/28.


    Cheers,
    Larry Rebich

    More tips link to:
    http://www.buygold.net/tips

    Please:
    No personal e-mail questions :-)


    "James Brown" <james@infocomp.co.uk> wrote in message news:3c9f9c2c@10.1.10.29...
    > Hi,
    >
    > Is there a way to find the height of the taskbar, so that my application can
    > hover neatly over it?
    >
    > --
    > Regards,
    >
    > Jamie Brown, Software Developer
    > InfoComp Ltd
    > E-Mail: james@infocomp.co.uk
    > URL: http://www.infocomp.co.uk
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center