|
|
|
Whenever the system time or the display resolution changes, Windows sends all the top-level windows (forms, in VB jargon) the WM_TIMECHANGE or WM_DISPLAYCHANGE message, respectively. Therefore, you can easily determine when these system-wide settings change by subclassing any form in your application, which is especially useful with the MsgHook DLL.
Using the same method you can also trap other system-wide messages, such as the WM_COMPACTING message, which Windows sends when it's short on memory: |
Note that you can indirectly trap this messages also by using the SysInfo.Ocx control, which exposes them as events. Using the subclassing technique outlined here you don't need any additional component except MsgHook.Dll (which you can use for other subclassing jobs).
|
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|