November 12th, 2013, 03:30 PM
API calls and the taskbar
I was trying to make a small utility for myself that functioned a bit like the stacks in OSX dock. I wanted to have a light-weight app pinned to the taskbar that would open a small launcher that contained useful apps and shortcuts. I want it to be as unobtrusive as possible.
I have a fair bit of vb.net experience; I have written some very extensive and complicated apps. I don't have a lot of experience with API calls, and to be honest, I'm not quite sure where to start.
My thoughts are,
1: Have a small app that simply closes after each instance, but remains pinned to the taskbar. That I can do without API calls I believe. When run, it opens a form at the cursor position. When the mouse leaves all controls, including the form, it closes.
2: Have an app that runs at startup, but remains minimized in the taskbar. When restored (clicked) it opens the form based on the cursor position. When the mouse leaves all controls, including the form, it minimizes.
What I am struggling with, is I would like the form to open not based on cursor position, but on the position of the icon/button on the taskbar. I believe this would require API calls, but I have not been able to figure out how to go about this. Since this would essentially be the starting position for the app, I think it needs to be the first thing I focus on. The rest is relatively basic.
Any thoughts on options 1 or 2, or a better option appreciated. Any thoughts on identifying the rectangle occupied by an item/button pinned to the taskbar, or a the task/button of a running app minimized to the taskbar would be greatly appreciated.
The only other thing I have struggled with is identifying the location (left, right, top, bottom) of the taskbar on a multi-monitor setup. I haven't explored this in great detail yet, but any help there would also be appreciated.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.