473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Finding taskbar location

Lee
Hi,

I'm looking for a way to determine the location of the taskbar, whether it's
located at the top, bottom, left or right of the screen. Is there any way
this can be done and if so, would anyone be kind enough to post example
code?

Thanks.
Sep 4 '08 #1
5 1822
On Sep 4, 4:50*pm, "Lee" <L...@nospam.netwrote:
Hi,

I'm looking for a way to determine the location of the taskbar, whether it's
located at the top, bottom, left or right of the screen. Is there any way
this can be done and if so, would anyone be kind enough to post example
code?

Thanks.
I'm curious, why would you need this?

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
Sep 4 '08 #2
Lee
Hi,

I want a form to pop up on hovering over a notifyicon (instead of a tooltip)
and i want it to display in the vicinity of the taskbar. To do this, I need
to know where the taskbar is located.
"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:bc**********************************@w7g2000h sa.googlegroups.com...
On Sep 4, 4:50 pm, "Lee" <L...@nospam.netwrote:
Hi,

I'm looking for a way to determine the location of the taskbar, whether
it's
located at the top, bottom, left or right of the screen. Is there any way
this can be done and if so, would anyone be kind enough to post example
code?

Thanks.
I'm curious, why would you need this?

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/

Sep 4 '08 #3
On Sep 4, 5:10*pm, "Lee" <L...@nospam.netwrote:
Hi,

I want a form to pop up on hovering over a notifyicon (instead of a tooltip)
and i want it to display in the vicinity of the taskbar. To do this, I need
to know where the taskbar is located.

"rowe_newsgroups" <rowe_em...@yahoo.comwrote in message

news:bc**********************************@w7g2000h sa.googlegroups.com...
On Sep 4, 4:50 pm, "Lee" <L...@nospam.netwrote:
Hi,
I'm looking for a way to determine the location of the taskbar, whether
it's
located at the top, bottom, left or right of the screen. Is there any way
this can be done and if so, would anyone be kind enough to post example
code?
Thanks.

I'm curious, why would you need this?

Thanks,

Seth Rowe [MVP]http://sethrowe.blogspot.com/
You might be able to use the FindWindowEx WinAPI function to find the
taskbar window if it has a standard name (couldn't tell you if it
does). Once you have a reference to it you should be able to find it's
location.

What I would suggest however, is to have the form initially pop-up in
the bottom-right corner of the window. Then make sure that the window
can be moved by the user and simply remember where the form was
dragged. That way the user can have the form pop-up where ever they
want (a very good thing) and your job will be much easier, especially
from a testing standpoint.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
Sep 5 '08 #4
Lee
It would seem that the taskbar does have a standard name "Shell_TrayWnd"
from which you can get it's location. There seems to be plenty of examples
dealing with this and the FindWindowEx command, so thank you for pointing me
in the right direction!

I'm also considering your suggestion about allowing the user to move the
pop-up to a desired location. To be honest, it's something that never even
crossed my mind but I guess it gives the user more flexibility in how it's
displayed.

Thanks again.
"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:86**********************************@2g2000hs n.googlegroups.com...
On Sep 4, 5:10 pm, "Lee" <L...@nospam.netwrote:
Hi,

I want a form to pop up on hovering over a notifyicon (instead of a
tooltip)
and i want it to display in the vicinity of the taskbar. To do this, I
need
to know where the taskbar is located.

"rowe_newsgroups" <rowe_em...@yahoo.comwrote in message

news:bc**********************************@w7g2000h sa.googlegroups.com...
On Sep 4, 4:50 pm, "Lee" <L...@nospam.netwrote:
Hi,
I'm looking for a way to determine the location of the taskbar, whether
it's
located at the top, bottom, left or right of the screen. Is there any
way
this can be done and if so, would anyone be kind enough to post example
code?
Thanks.

I'm curious, why would you need this?

Thanks,

Seth Rowe [MVP]http://sethrowe.blogspot.com/
You might be able to use the FindWindowEx WinAPI function to find the
taskbar window if it has a standard name (couldn't tell you if it
does). Once you have a reference to it you should be able to find it's
location.

What I would suggest however, is to have the form initially pop-up in
the bottom-right corner of the window. Then make sure that the window
can be moved by the user and simply remember where the form was
dragged. That way the user can have the form pop-up where ever they
want (a very good thing) and your job will be much easier, especially
from a testing standpoint.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/

Sep 5 '08 #5
It would seem that the taskbar does have a standard name "Shell_TrayWnd"
from which you can get it's location. There seems to be plenty of examples
dealing with this and the FindWindowEx command, so thank you for pointing me
in the right direction!
When it comes to WinApi a site that could be very handy for you is
http://pinvoke.net/
I'm also considering your suggestion about allowing the user to move the
pop-up to a desired location. To be honest, it's something that never even
crossed my mind but I guess it gives the user more flexibility in how it's
displayed.
That's actually the main reason I asked why you were looking to do
something. Often times developers can get "tunnel vision" and not see
an alternative way to accomplish the same goal.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
Sep 5 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Maka Sili | last post by:
Hi, My VC++ application does not have a titlebar (and therefore no System menu, no minimize, no maximize and no close button). We have a custom button for minimize and close. When the app...
0
by: pmclinn | last post by:
How would you find the location the location of the task bar, and it's current width and height?
2
by: JohnProgrammer | last post by:
I know I can fill the screen in VB.NET by starting my window maximized and without a border. My question is; in VB.NET is there a way to enable/disable the taskbar much like doing the "always on...
2
by: Geoff Jones | last post by:
Hiya Can anybody help me with the following question? I have an application which has a maximised main form. At startup, the form is maximised but the taskbar is still visible at the bottom of...
0
by: nick.spacek | last post by:
Hi everyone, I'm wondering if anyone knows how to tell if a process has an icon in the system tray? And for that matter, the taskbar as well? Currently I'm just finding out what apps have a...
0
by: JaimeM26 | last post by:
Does anyone know how to detect and move/resize the Taskbar in VB.NET? I am able to determine if it is on the top or bottom by comparing the following 2 items. ...
0
by: Salem | last post by:
Hello everyone! :) In case anyone wanted to replace the winxp system menu that pops up every time you right click your apps taskbar button with your own context menu read on... I googled a...
0
by: NSF12345 | last post by:
Iv developed a small program that looks for a file over our network, and copy it to the location of another computer. Im using the "If FileExists("\\oldpc\main share\Folder\file.txt") Then" way of...
10
by: Mark Rae [MVP] | last post by:
Hi, This is really just a theoretical question for my own interest, and not for any nefarious purpose... :-) Say we have three applications running - Notepad, Wordpad and Excel - and each...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.