Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Request: A better system tray icon DLL

Author
Message
GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 22nd Jan 2011 02:17
Awhile I go I came across this DLL and bookmarked it for later use. Now that I have a use for it, it feels like it is lacking in what it does. It was last updated in 2006 and the newer OS's have added some fancier message boxes that aren't completely feasible using the dll, or at least not that I could see. When you use that DLL to create a popup menu, your project stops running until it receives a message from the popup menu with the results, which isn't ideal, and it appears as though the popup menus cannot be canceled by clicking outside the popup; you MUST select something for it to go away.

Looking at the DBA code for that DLL is somewhat of a headache. For DBPro users who are used to very simple commands, such as "load image", the amount of work necessary to create and manage a system tray icon, something that has been used in windows applications for years, seems a bit much. I can load and navigate a 3D world in DBPro with less than 30 lines, but adding an icon to my system tray requires several hundred.

So, what I would like to see is a DLL that adds much simpler commands. I would even be willing to help in any way that I can, but I am not a C++ expert and calling commands to external DLLS is something with which I am terrible. I believe we will need Shell32.dll to make the icon, and user32.dll to create popup menus, but this is all speculation. The MSDN has a great article on this subject.

Here are some example commands I think would work:

SYSTRAY SET ICON icon_file$
SYSTRAY HIDE ICON
SYSTRAY SHOW ICON
SYSTRAY SET TOOLTIP text$
SYSTRAY CLEAR TOOLTIP
SYSTRAY SHOW BALLOON balloon_type, image, title_text$, message_text$
SYSTRAY HIDE BALLOON
SYSTRAY GET NUM MESSAGES
SYSTRAY GET MESSAGE(msgNum)
SYSTRAY CREATE POPUP
SYSTRAY SET POPUP itemNum, text$, flags (disabled, ??)

Here is an example balloon stolen from MSDN:


So, anyone interested in taking this on?

Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 31st Jan 2011 00:11
Quote: "So, anyone interested in taking this on?"

I can try to add this functionality to my BBB Gui plugin

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 31st Jan 2011 19:26
I suppose you could, but some people do not use the BBB Gui plugin so if you go that route you could make a separate DLL as well as add it to yours.

Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 31st Jan 2011 20:12
Or just download the plugin...

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Feb 2011 21:35
GIDustin thanks for creating this

If a thought is Just a thought ~ so whats the main thought ?
GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 22nd Feb 2011 00:15
Quote: "GIDustin thanks for creating this"


But . . . I haven't yet. I merely linked to someone else's work saying "Hey, this needs to be updated to the latest and greatest OS standards"

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 22nd Feb 2011 01:49
ok then thanks for pointing to this ;o)

I've got DBP 7.7 r6 and it worked

If a thought is Just a thought ~ so whats the main thought ?

Login to post a reply

Server time is: 2024-05-18 13:19:08
Your offset time is: 2024-05-18 13:19:08