"Jeff David" wrote in message news:3AD1B811.6B6213EF@lucent.com '''Is there any way to retrieve the desktop properties in Windows? Specifically, I am looking to retrieve the user's Active Title Bar size (which I can get by bringing up the Desktop's "Properties" dialog, clicking on the "Appearance" tab and selecting the "Active Title Bar" item). [Tom Wilkason] replied: Try the procedure below on your machine (only tested on Win2K), the title height is '''CaptionHeight''' and the borderwidth is '''BorderWidth''' proc winGetDesktopSetting {what} { package require registry set modValues { BorderWidth CaptionHeight CaptionWidth IconSpacing IconVerticalSpacing MenuWidth MenuHeight ScrollHeight ScrollWidth SmCaptionFont smCaptionWidth } if {[lsearch -exact $modValues $what] >= 0} { if {[catch {registry get \ "HKEY_CURRENT_USER\\Control Panel\\Desktop\\WindowMetrics"\ $what} result]} { return -code error $result } else { return [expr {-$result/15}] } } else { return -code error "Valid values are: $modValues" } } [Jeff David] replied that it worked fine on NT after changing the divisor to 12. ---- Getting display appearance settings It is nice to be able to match TCL colors to the user specific settings. The following procedure gets all of those settings for you and puts them into a global array. proc RegColors {} { set ::regColor(Listing) [registry values "HKEY_CURRENT_USER\\Control Panel\\Colors\\"] foreach regSetting $::regColor(Listing) { set ::regColor($regSetting) [registry get "HKEY_CURRENT_USER\\Control Panel\\Colors\\" $regSetting] set ::regColor($regSetting) "#[format "%02X%02X%02X" [lindex $::regColor($regSetting) 0] [lindex $::regColor($regSetting) 1] [lindex $::regColor($regSetting) 2]]" } } The full value listing is: ActiveBorder ActiveTitle AppWorkSpace Background ButtonAlternateFace ButtonDkShadow ButtonFace ButtonHilight ButtonLight ButtonShadow ButtonText GradientActiveTitle GradientInactiveTitle GrayText Hilight HilightText HotTrackingColor InactiveBorder InactiveTitle InactiveTitleText InfoText InfoWindow Menu MenuText Scrollbar TitleText Window WindowFrame WindowText MenuHilight MenuBar All color settings are returned as RGB triplets example: 0 0 0 This procedure converts the value to HEX. ---- [Arts and crafts of Tcl-Tk programming]