Settings for User's selected 'theme'

willisgt

Active Member
Licensed User
I'm wondering two things:

1.) What sort of information is stored in a Windows Mobile 'theme'? By that, I mean the theme a user can select in Start > Settings > Today.

2.) How can I get to that information?

My goal is to have my application mirror the user's selected theme, especially with respect to color, font, and font size.

Strange to think I'm even worried about such a thing... I recall having more than one discussion on the virtues of green vs. amber monochrome displays, back in the day...

Gary
 

willisgt

Active Member
Licensed User
What I've learned on this...

For those who may be wondering, here's what I've learned on this:

1.) The data is stored in a kind of a CAB file. These are stored in either the Windows or My Documents folders. The files have an extension of *.tsk.

2.) The registry entries which store the data are:

HKEY_CURRENT_USER\Software\Microsoft\Today
HKEY_LOCAL_MACHINE\Software\Microsoft\Color

I'm using an altered version of the code Erel uses in GPS4PPC to locate the COM ports to try to resolve the values for these, but I'm doing something wrong. Admittedly, I know almost nothing about the Windows registry.

B4X:
Sub Globals

   'Declare the global variables here.

   Dim subKeys(0) As String   
   Dim values(0) As String

End Sub


Sub App_Start

   registry.New1

   Form1.Show
   
   'Gets the list of active drivers.

   al.Clear
   lb.Clear
   
   If CPPC Then

      registry.RootKey( registry.rtCurrentUser )

      'Gets the list of active drivers.
      subKeys() = registry.GetSubKeyNames( "Software\Microsoft\Today" )   ' "Drivers\Active"

      subkeycount = ArrayLen( SubKeys() )

      al.Add( "subkeys: " & subkeycount )

      For i = 0 To subkeycount - 1

         values() = registry.GetValueNames( "Software\Microsoft\Today\" & subKeys(i) ) ' Drivers\Active\

         For i2 = 0 To ArrayLen( values() ) - 1

            If values( i2 ) = "Name" Then 'Checks if Name value exists.

               name = registry.GetValue( "Software\Microsoft\Today\" & subKeys(i), "Name" )   ' Drivers\Active\

               key = registry.GetValue( "Software\Microsoft\Today\" & subKeys(i),"Key" )   ' Drivers\Active\
               al.Add( name & ": " & registry.GetValue( key, "FriendlyName" ) ) 'Gets the FriendlyName value.

               Exit

            Else

               al.Add( values(i2) & ": (no name)" )

            End If


            For j = 0 To registry.ValueCount( subKeys(i) ) - 1
               al.Add( "value: " & registry.GetValue( subKeys(i), values(i2) ) )
            Next

         Next

      Next


      For i = 0 To al.Count-1
   
         lb.Add( al.Item(i) ) 'Adds the values to the ListBox.

      Next

   Else

      lb.Add( "Please run this program on a mobile device." )

   End If

End Sub
As always, any help on this is greatly appreciated.


Gary

:sign0085:
 
Top