473,394 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

VB get location and size of system clock?

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).

2 1455
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
Leftic
5
Thanks for the help.
Dec 11 '13 #3

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

Similar topics

3
by: James Harriman | last post by:
Hi, I need to be able to measure a time interval in milliseconds on a windows machine. I have tried using time.clock() but it appears to measure time in seconds...Is there a way to measure time...
4
by: Mario T. Lanza | last post by:
Greetings, I am developing an app that utilizes a custom internet-based replication process. Every record in my database has a DateAdded and DateUpdated column to facilitate this. There are...
2
by: David Lindgren | last post by:
Hello. I am trying to figure out a way to determine if the user has resetted the system clock between two times of running my application. One idea I have is that I could check the modified date...
8
by: eugene | last post by:
Is there any issue re-setting system time while DB2 database is online and the system clock is ahead. The database is actually a 24x7 operational and a unscheduled shutdown would be a problem....
4
by: Fritz89 | last post by:
I'm a Visual Basic .NET developer. I would like to know if there is any code which enables me to set the time of the System's clock with my favourite values. Is it possible to make a form with...
12
by: jUrner | last post by:
Hello all I have the problem of how to calculate the resolution of the system clock. Its now two days of head sratching and still there is nothing more than these few lines on my huge white...
5
by: Moikel | last post by:
Hello, I'm writing a program that requires that I generate random numbers. I'm using the C rand()function. I want to use the system clock as a seed for the function. How do I read the system...
3
by: Carlos Lozano | last post by:
I have requirement to pause the system clock until a certain event (Win XP). Then the clock will be resumed to the real time. I think it can be done using core functions and/or redirecting the...
1
by: Marc the Demi-Programmer | last post by:
I am overriding WncProc to make sure my form's location stays within specified parameters. Basically, it has to stay at the top of the screen and not be off to either of the sides. All that works...
2
by: Dica | last post by:
i'm working on a windows service that needs to check the system's clock every minute and see if there are any jobs in my database taht are scheduled to run at that time: sSql = "select * from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.