473,545 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1827
On Sep 4, 4:50*pm, "Lee" <L...@nospam.ne twrote:
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_newsgroup s" <ro********@yah oo.comwrote in message
news:bc******** *************** ***********@w7g 2000hsa.googleg roups.com...
On Sep 4, 4:50 pm, "Lee" <L...@nospam.ne twrote:
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.ne twrote:
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_newsgroup s" <rowe_em...@yah oo.comwrote in message

news:bc******** *************** ***********@w7g 2000hsa.googleg roups.com...
On Sep 4, 4:50 pm, "Lee" <L...@nospam.ne twrote:
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.blogsp ot.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_Tray Wnd"
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_newsgroup s" <ro********@yah oo.comwrote in message
news:86******** *************** ***********@2g2 000hsn.googlegr oups.com...
On Sep 4, 5:10 pm, "Lee" <L...@nospam.ne twrote:
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_newsgroup s" <rowe_em...@yah oo.comwrote in message

news:bc******** *************** ***********@w7g 2000hsa.googleg roups.com...
On Sep 4, 4:50 pm, "Lee" <L...@nospam.ne twrote:
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.blogsp ot.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_Tray Wnd"
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
4955
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 is in normal/maximized view, clickinng on the taskbar entry does not minimize the application. Normally (with apps with titlebar), the application...
0
825
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
24846
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 top" feature? I would like my program to automatically "hide" the taskbar when running. Thanks. John
2
1460
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 the screen. However, if the form is minimised, and then maximised, the taskbar is covered by the form; even though the taskbar is locked. Can...
0
995
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 MainWindowHandle but not all of those show in the taskbar always. Thanks Nick
0
1459
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. System.Windows.Forms.Screen.PrimaryScreen.Bounds() and System.Windows.Forms.Screen.PrimaryScreen.WorkingArea But i am having trouble moving the task bar back to its default
0
9956
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 little and i found that there is an undocumented 0x0313 windows message that's sent when the user rightclicks the taskbar button: private const int...
0
1867
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 finding if the file exists, but i want to make it so that it tries to look for the computer, not the file. At the moment this is how i am finding and...
10
2492
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 window is in its "normal" state i.e. not maximised, and not minimised to the taskbar. We click each of the three taskbar buttons in turn and, of...
0
7459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7393
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7653
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7411
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7749
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5965
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5322
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1871
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
695
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.