3/27/2023 0 Comments Purebasic windowcolor![]() I do not know if keeping it within a Procedure would hinder performance. and instead place it within the main loop. It is probably better practice to remove the StartDrawing(WindowOutput(hwnd)) from this procedure TextGadget() seem's to leave holes behind everything Procedure TransparentTextGadget(hwnd.l, x, y, string.s, Font.l, Color.l) - Create Text without a background SetLayeredWindowAttributes_(WindowID(winResult),transColor,#Null,#LWA_COLORKEY) SetWindowPos_(WindowID(winResult),#Null, x, y, width, height, #Null) - Must redraw window, according to the MSDN SetWindowLongPtr_(WindowID(winResult),#GWL_EXSTYLE, #WS_EX_LAYERED) - According to the MSDN, this function will work with both x86 and 圆4 ( (v=VS.85).aspx ) WinResult = OpenWindow(#PB_Any, 1, 1, 1, 1, "",#PB_Window_BorderLess| #PB_Window_Invisible) I have only tested on both x86 and 圆4 Windows 7 I do not know if this works on all versions of windows or just Vista / 7 HideWindow(winResult, 0) after gadgets have been placed. It may also be undesirable on Windows 11 in scripts which use a non-default light background.Procedure OpenTransparentWindow(transColor, x, y, width, height) - Create an invisible, borderless, and transparent window I am not inclined to do this by default due to complexity, and doubts about how it will affect any other version of Windows, including future versions. If !DllCall("RectVisible", "ptr", hdc, "ptr", rect)ĭllCall("FillRect", "ptr", hdc, "ptr", rect, "ptr", hbrush) Exclude the control from default handling of WM_ERASEBKGND. Static hbrush := DllCall("GetSysColorBrush", "int", 5, "ptr")ĭllCall("FillRect", "ptr", hdc, "ptr",
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |