Results 1 to 6 of 6

Thread: How to refresh the Today screen?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    3

    How to refresh the Today screen?

    I did a search and couldn't find an answer to this question but it seems like it should be possible to do...

    I was wondering how to cause a refresh of the Today screen using Visual Basic .NET. I suspect is would be something along the lines of using a coredll call but I just can't find anything to give me insight into this problem.

    Thanks

  2. #2
    Member
    Join Date
    Feb 2007
    Location
    Netherlands
    Posts
    43

    Re: How to refresh the Today screen?

    I think you can only program the today screen from unmanaged/c++ code. But im not sure what you are trying to do.

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    3

    Re: How to refresh the Today screen?

    I seem to have stumbled onto a solution. I did a search on coredll.dll and the today screen and found someone trying to change the background picture or theme... Anyway, he used the following code...




    Code:
    Imports System.Runtime.InteropServices
    Module Module1
        Const HWND_BROADCAST As Integer = &HFFFF
        Const WM_WININICHANGE As Integer = &H1A
        Sub Main()
            SendMessage(HWND_BROADCAST, WM_WININICHANGE, &HF2, 0)
        End Sub
        <DllImport("coredll")> Private Function SendMessage(ByVal hwnd As Integer, ByVal msg01 As Integer, ByVal msg02 As Integer, ByVal msg03 As Integer) As Integer
        End Function
    End Module
    I figured that I would code it up and play with the messages to see if I could get this to do what I wanted and to my utter surprise this does exactly what I wanted. I just wish I actually understood what it is doing. I don't even have a clue where the constants came from or why those were chosen. I haven't really been able to find anything useful doing a search either. Oh well....

  4. #4
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: How to refresh the Today screen?

    You are sending a message that you have updated the Win.ini.
    I assume that the refresh is made by accident.
    I don't know how correct it is but apparently and since i don't know how to refresh the screen myself you can use it if it works.

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    3

    Re: How to refresh the Today screen?

    That makes sense given the Names of the Constants. You wouldn't happen to know where a table of the message values / constants could be found do you? That would probably yield a treasure trove of possibilities.

    Thanks

  6. #6
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: How to refresh the Today screen?

    No but that's a good question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width