PowerBuilder Function Get Color System gf_get_color_system
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Function Name : gf_get_color_system // Argument Name : (none) // Return Type : Long /////////////////////////////////////////////////////////////////////////////////////////////////////////////// String ls_Value String ls_Color Integer li_pos1 Integer li_pos2 Long ll_r Long ll_g Long ll_b Long ll_Color /*Constant System Color SCROLLBAR BACKGROUND ACTIVETITLE INACTIVETITLEMENU WINDOW WINDOWFRAME MENUTEXT WINDOWTEXT TITLETEXT ACTIVEBORDER INACTIVEBORDER APPWORKSPACE HILIGHT HILIGHTTEXT BUTTONFACE BUTTONSHADOW GRAYTEXT BUTTONTEXT INACTIVETITLETEXT BUTTONHILIGHT BUTTONDKSHADOW BUTTONLIGHT INFOTEXT INFOWINDOW BUTTONALTERNATEFACE HOTTRACKINGCOLOR GRADIENTACTIVETITLE GRADIENTINACTIVETITLE */ ls_Color = "BUTTONFACE" If RegistryGet("HKEY_CURRENT_USER\Control Panel\Colors", ls_Color, RegString!, ls_Value) > 0 Then li_pos1 = Pos(ls_Value, ' ', 1) ll_r = Long(Mid(ls_Value,1,li_pos1 - 1)) li_pos2 = Pos(ls_Value, ' ', li_pos1 + 1) ll_g = Long(Mid(ls_Value,li_pos1 + 1, li_pos2 - li_pos1)) ll_b = Long(Mid(ls_Value, li_pos2)) ll_Color = RGB(ll_r, ll_g, ll_b) End If Return ll_Color |
Good Luck!