|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I want to write a small program that will display a status icon in the
system tray and pop up small messages in the corner of the screen. [It
is critical that these do *not* take the input focus. Can you imagine
how *annoying* that would be?]
Any suggestions as to how to pull this off? Personally I don't know of a
programming language that makes it easy to do this kind of thing.
[Obviously everything is possible in C, if you can figure out your way
around the low-level Win32 API... But that doesn't sound like my idea of
a good time.]
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I want to write a small program that will display a status icon in the
> system tray and pop up small messages in the corner of the screen. [It
> is critical that these do *not* take the input focus. Can you imagine
> how *annoying* that would be?]
>
> Any suggestions as to how to pull this off? Personally I don't know of a
> programming language that makes it easy to do this kind of thing.
>
> [Obviously everything is possible in C, if you can figure out your way
> around the low-level Win32 API... But that doesn't sound like my idea of
> a good time.]
Check out the "Shell_NotifyIcon" function from shell32.dll.
Details on the msdn here:
http://msdn2.microsoft.com/en-us/library/aa922175.aspx
And I'm sure lots of other results from google.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Details on the msdn here:
>
> http://msdn2.microsoft.com/en-us/library/aa922175.aspx
Oops that was for CE/Mobile. Here's the one for XP/Vista:
http://msdn2.microsoft.com/en-us/library/aa922175.aspx
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
scott wrote:
>> http://msdn2.microsoft.com/en-us/library/aa922175.aspx
>
> http://msdn2.microsoft.com/en-us/library/aa922175.aspx
Uh... Scott, honey... you wanna re-check that? ;-)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Uh... Scott, honey... you wanna re-check that? ;-)
Stupid Ctrl-C not working in Firefox ;-)
http://msdn2.microsoft.com/en-us/library/bb762159(VS.85).aspx
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
scott wrote:
>> Uh... Scott, honey... you wanna re-check that? ;-)
>
> Stupid Ctrl-C not working in Firefox ;-)
Oh sure, whatever. ;-)
> http://msdn2.microsoft.com/en-us/library/bb762159(VS.85).aspx
Thanks.
Hmm... looks pretty complicated. And presumably I'm going to need the
header files and stuff - not to mention a C compiler. Gee, it could take
me quite a while to figure this stuff out... :-S
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>> http://msdn2.microsoft.com/en-us/library/bb762159(VS.85).aspx
>
> Thanks.
>
> Hmm... looks pretty complicated. And presumably I'm going to need the
> header files and stuff - not to mention a C compiler. Gee, it could take
> me quite a while to figure this stuff out... :-S
I'm sure you can use some other language that allows access to DLLs?
Here is the extract from shellapi.h that should give you the layout of the
data structures in memory and the constants (it includes two different
versions for unicode and non-unicode):
////
//// Tray notification definitions
////
typedef struct _NOTIFYICONDATAA {
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
CHAR szTip[64];
} NOTIFYICONDATAA, *PNOTIFYICONDATAA;
typedef struct _NOTIFYICONDATAW {
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
WCHAR szTip[64];
} NOTIFYICONDATAW, *PNOTIFYICONDATAW;
#ifdef UNICODE
typedef NOTIFYICONDATAW NOTIFYICONDATA;
typedef PNOTIFYICONDATAW PNOTIFYICONDATA;
#else
typedef NOTIFYICONDATAA NOTIFYICONDATA;
typedef PNOTIFYICONDATAA PNOTIFYICONDATA;
#endif // UNICODE
#define NIM_ADD 0x00000000
#define NIM_MODIFY 0x00000001
#define NIM_DELETE 0x00000002
#define NIF_MESSAGE 0x00000001
#define NIF_ICON 0x00000002
#define NIF_TIP 0x00000004
WINSHELLAPI BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA
lpData);
WINSHELLAPI BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW
lpData);
#ifdef UNICODE
#define Shell_NotifyIcon Shell_NotifyIconW
#else
#define Shell_NotifyIcon Shell_NotifyIconA
#endif // !UNICODE
////
//// End Tray Notification Icons
////
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Invisible wrote:
> I want to write a small program that will display a status icon in the
> system tray and pop up small messages in the corner of the screen. [It
> is critical that these do *not* take the input focus. Can you imagine
> how *annoying* that would be?]
>
> Any suggestions as to how to pull this off? Personally I don't know of a
> programming language that makes it easy to do this kind of thing.
>
> [Obviously everything is possible in C, if you can figure out your way
> around the low-level Win32 API... But that doesn't sound like my idea of
> a good time.]
>
This, too if you'd prefer to use VB or C#:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.notifyicon.aspx
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Raiford wrote:
> This, too if you'd prefer to use VB or C#:
Well, that looks a little easier. I'd still have to install the entire
.NET framework just for this tiny application, but at least I don't need
to worry about causing segfaults in J#...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Invisible wrote:
> I want to write a small program that will display a status icon in the
> system tray and pop up small messages in the corner of the screen. [It
> is critical that these do *not* take the input focus. Can you imagine
> how *annoying* that would be?]
>
> Any suggestions as to how to pull this off? Personally I don't know of a
> programming language that makes it easy to do this kind of thing.
>
> [Obviously everything is possible in C, if you can figure out your way
> around the low-level Win32 API... But that doesn't sound like my idea of
> a good time.]
>
Using C#:
Start a Windows project. Open the default form in design mode. Open
the Toolbox, grab a NotifyIcon, and drop it on the form. Look through
the properties, events, and methods (all very standard Windows stuff)
and see if what you need is in there. Note that, while the Help file is
fairly useful, Object Browser is your friend. ;)
(I'm using Visual Studio 2005 Pro...don't know if there's any difference
in the Express version or not.)
Is this at all useful?
--Sherry Shaw
--
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}// TenMoons
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |