ChristianB, you still around? Got to doing the TrayIcon work

Hi Alec, I'm sorry I'm just now getting this. I never look at that top line that says how many private messages I have. Did you ever figure this out? I can send you a working Delphi 6 tray application.

Everything New Technology 1823 This topic was started by ,


data/avatar/default/avatar06.webp

760 Posts
Location -
Joined 2001-11-10
Hi Alec,
I'm sorry I'm just now getting this. I never look at that top line that says how many private messages I have . Did you ever figure this out? I can send you a working Delphi 6 tray application. Send me a private message with your e-mail and I'll fly the source code your way. Hey by the way I learned two obscure languages PowerBASIC and RealBasic, both are very cool offer distinct advantages over VB6 or VB.net. I wrote a PowerBASIC app whose source code is 114KB, artwork another 14KB, and still the standalone executable is only 70KB! RealBasic can compile from windows 4 different exes in succession Win32, Linux, Mac OSX, & Mac OS 7-9. All of the exes are standalone too! It's very similar to VB which is nice, whereas PowerBASIC is very similar to procedural C++.
Cheers,
Christian Blackburn
 

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar06.webp

760 Posts
Location -
Joined 2001-11-10
OP
Hi Alec,
Okay I took a look at your code. This is probably wrong:
 
lngOriginal_Window_Procedure:=GetWindowLong(Application.Handle,1);
 
In my example the way you get the handle of the original window procedure should be by usurping it. However if your original window procedure doesn't need to subclassed (overridden) then that is okay.
 
You may want to re-read my example and make sure that any time I make an API call you do to!
 
If you can't recognize a command, then it's probably a windows API command. Reference your Win32.hlp file:
"C:\Program Files\Common Files\Borland Shared\MSHelp\WIN32.HLP"
to see whether or not a particular command is an API call.
 
Once you think you're properly intercepting the Window's Event Handling procedure, you'll want to send a test message to it and process the test message. So from another program send something like
(note lngWindow_Handle is the handle of the Window [not the windows event handler] or your application if it's entirely procedural)
 
SendMessage lngWindow_Handle, WMUSER + 501, 0, 0
 
Then from your window handling procedure you'll want to check for a WMUSER+501 message and when you receive it display a messagebox so you know you received it properly. As for the + 501, check the help file and make sure my recommendation is beyond the range of the Common Controls library. This can be found by using the aforementioned help file and looking up WM_USER.
 
If you don't know how to find the handle of another program, you'll want to use FindWindow a windows api call. If you don't know how to find the classname of a window use Spy++.
 
Good Luck,
Christian Blackburn