By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,950 Members | 1,005 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,950 IT Pros & Developers. It's quick & easy.

VB get location and size of system clock?

P: 5
What I want to do is get the location of the system clock in the bottom right corner, then change my forms size to match the clocks size, then move my form to the clocks location (im creating a personal clock replacement program)

Or even better, how would I say create a ".dll" (or whatever the extension is for the system clock) that if you where to say replace with this one, it would replace the clock with my form?

Thanks for any help in advance.
Dec 6 '13 #1

✓ answered by mayevski

Overlay idea is bad and ineffective.

The right approach is to create a global hook and once the hook is loaded into Explorer process, inject a DLL into Explorer's address space. Then hook the clock window's messages, intercept WM_PAINT and a bunch of other messages and draw your content. You can also resize the clock window.

Clock window class can be learned using WinSpy tool from SDK. It's "TrayClockWClass".

We once sold the application called EldoS Clock, then EldoS Pads, that did exactly what you want to do.

And, btw, this can not be done in .NET - this should be unmanaged code (C++, Delphi).

Share this Question
Share on Google+
2 Replies


P: 3
Overlay idea is bad and ineffective.

The right approach is to create a global hook and once the hook is loaded into Explorer process, inject a DLL into Explorer's address space. Then hook the clock window's messages, intercept WM_PAINT and a bunch of other messages and draw your content. You can also resize the clock window.

Clock window class can be learned using WinSpy tool from SDK. It's "TrayClockWClass".

We once sold the application called EldoS Clock, then EldoS Pads, that did exactly what you want to do.

And, btw, this can not be done in .NET - this should be unmanaged code (C++, Delphi).
Dec 11 '13 #2

P: 5
Thanks for the help.
Dec 11 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.