Procedure FullColorRequester(Color = #PB_Default, X = #PB_Default, Y = #PB_Default, BackColor = #PB_Default) Place CHOOSECOLOR Info into requester() If OpenPreferences(GetTemporaryDirectory() "GetUserColors.prefs") WritePreferenceInteger("COLORREF" Str(I 1), COLORPREF(I)) So create it with Default valuesĬreatePreferences(GetTemporaryDirectory() "GetUserColors.prefs") If OpenPreferences(GetTemporaryDirectory() "GetUserColors.prefs") It exists, retrieve the GetUserColors.prefs informationĬOLORPREF(I) = ReadPreferenceInteger("COLORREF" Str(I 1), COLORPREF(I))Įlse Does not exist, "GetUserColors.prefs" is erased. Procedure InitColorPrefs() Color Preference file - Storage information SetWindowPos_(hWnd, #HWND_TOPMOST, CColorX, CColorY, 0, 0, #SWP_NOSIZE)ĬColorBrush = CreateSolidBrush_(CColorBackGround)Ĭase #WM_CTLCOLORDLG, #WM_CTLCOLORSTATIC, #WM_CTLCOLOREDIT If CColorY (Rect\bottom - Rect\top) > (DesktopRect\bottom - DesktopRect\top) : CColorY = (DesktopRect\bottom - DesktopRect\top) - (Rect\bottom - Rect\top) : EndIf If CColorX (Rect\right - Rect\left) > (DesktopRect\right - DesktopRect\left) : CColorX = (DesktopRect\right - DesktopRect\left) - (Rect\right - Rect\left) : EndIf If X, Y are always too large, set the maximum position to stay in Desktop work area If CColorY (Rect\bottom - Rect\top) > (DesktopRect\bottom - DesktopRect\top) : CColorY - (Rect\bottom - Rect\top) : EndIf If CColorX (DesktopRect\right - DesktopRect\left) : CColorX - (Rect\right - Rect\left) : EndIf SystemParametersInfo_(#SPI_GETWORKAREA, 0, 0) ![]() Mini and Maxi position X, Y to stay in Desktop work area Global CColorX, CColorY, CColorBackGround | #PB_Default = Default Background Colorĭeclare ChooseColorProc(hWnd, uMsg, wParam, lParam)ĭeclare FullColorRequester(Color = #PB_Default, X = #PB_Default, Y = #PB_Default, BackColor = #PB_Default) BackColor : Requester Background Color | X, Y position, scaling inside based on DPI | #PB_Default = Mouse position in the window's internal area. | X, Y position inside the Window, scaling inside based on DPI ![]() ![]() It will keep the special colors the user last adjusted. stays in the temporary directory even when user switches to other programs. Goal - write a 'Unique' preference file in the temporary directory that For Windows 10 and up, Buttons use the DarkMode_Explorer theme If the Background Color is Dark. EnableHook for the ColorRequester Position and Set the ColorRequester Background Color. Explain: Create a new ColorRequester that saves User Colors (between calls)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |