Results 1 to 6 of 6

Thread: determine windowing style *RESOLVED!*

  1. #1

    Thread Starter
    Hyperactive Member jovton's Avatar
    Join Date
    Nov 2000
    Location
    South Africa
    Posts
    266

    determine windowing style *RESOLVED!*

    hey.

    how can i determine, via vb.net code, if a user has xp style enabled on their desktop? Easy enough to determine OS version, but what about xp style?

    thanx.
    Last edited by jovton; Apr 24th, 2004 at 03:31 AM.
    jovton

  2. #2
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961
    why u need to do that? i mean, what's the purpose?

    i think the style may not be the static property of the OS for one PC as it may vary from user to user.

  3. #3
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Originally posted by pvbangera
    why u need to do that? i mean, what's the purpose?

    i think the style may not be the static property of the OS for one PC as it may vary from user to user.
    There could be several reasons. I'd like to know too.
    When developing visual ownerdrawn controls it would be nice if the control automatically follows the theme.

    So for that reason it would be nice to know if the styles are used or not, and if they are, which one. (not considering custom styles, but only the built-in styles)

    They way I do it at the moment, is checking the RGB values of systemcolor.activecaption. This colour is unique for LunaBlue, OliveGreen and Silvergrey. If the color doesnt match any of these three, I assume styles aren't used.

    But this method isn't very reliable, because the user could easily have changed this color or the user could be using a custom theme with a totally different colorscheme.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  4. #4
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    Found it.

    You can look in the registry.
    If you run RegEdit and browse to the following key, you find all the info you need : HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager

    Then it's just a matter of looking up the ThemeActive value thru VB.

    I hope this helps you. I know it helps me..
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  5. #5

    Thread Starter
    Hyperactive Member jovton's Avatar
    Join Date
    Nov 2000
    Location
    South Africa
    Posts
    266
    Geeee. Thanks. What do I owe you?
    Last edited by jovton; Apr 24th, 2004 at 03:34 AM.
    jovton

  6. #6
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Originally posted by jovton
    Geeee. Thanks. What do I owe you?
    Well, maybe you can help me out some day...
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

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