radiovasup.blogg.se

Github xojo mask
Github xojo mask












  1. Github xojo mask code#
  2. Github xojo mask windows#

What I’m left with is a custom shaped window but instead of a semi-transparent drop shadow over the screen behind, it’s a drop shadow over the system color bg. 'call sendMessageA( me.handle, WM_SETREDRAW, 1, 0 )

github xojo mask

'call sendMessageA( me.handle, WM_SETREDRAW, 0, 0 ) 'call sendMessageW( me.handle, WM_SETREDRAW, 1, 0 ) 'call sendMessageW( me.handle, WM_SETREDRAW, 0, 0 ) 'if System.IsFunctionAvailable( "SendMessageW", "User32" ) then 'Soft Declare Function SendMessageW Lib "User32" ( hwnd as Integer, msg as Integer, wParam as Integer, lParam as Integer ) as Integer 'Soft Declare Function SendMessageA Lib "User32" ( hwnd as Integer, msg as Integer, wParam as Integer, lParam as Integer ) as Integer '// - To reduce 'flickering' we'll freeze the display, refresh and then release. The color is in ARGB, instead of RGBA (Xojo)ĭeclare function SetLayeredWindowAttributes lib "user32" (hWnd as Integer, ColorRef as integer, AlphaCode as byte, dwFlags as integer) as BooleanĬall setlayeredwindowattributes(me.Handle, &h00FFFFFF, 0, 1) - This last declare is the magic one, that masks out via color.

Github xojo mask code#

//////////////////////////////////////////////////////////////////////////////////////////////// // - The following code reduces the border and window title to nothing!ĭeclare function GetWindowLong lib "User32" Alias "GetWindowLongA" ( hwnd as integer, flags as integer ) as integerĭim WS_NOBORDER as integer = GetWindowLong(me.Handle, GWL_EXSTYLE) and not WS_CAPTION and not WS_THICKFRAME and not WS_MINIMIZE and not WS_MAXIMIZE and WS_SYSMENUĭeclare Function SetWindowLong Lib "User32" Alias "SetWindowLongA" (hwnd As Integer, nIndex As Integer, dwNewLong As Integer) As IntegerĬall setwindowlong (me.Handle, GWL_STYLE, WS_NOBORDER)Ĭall setwindowlong (me.Handle, GWL_EXSTYLE,WS_EX_LAYERED) // - Needed to allow the setLayerWindowAttributes to workĭeclare Function SetWindowPos Lib "User32" (hwnd as Integer, hWndInstertAfter as Integer, x as Integer, y as Integer, cx as Integer, cy as Integer, flags as Integer) as IntegerĬall SetWindowPos(me.WinHWND, 0, left, top, width-1, height-1, SWP_FRAMECHANGED) //Apply border reduction This is faster than using CreateRectRgn, CombineRgn, DeleteObject It works by removing the window’s border and title, then telling the OS to mask out

Github xojo mask windows#

This uses code from the Windows Functionality Suite to reduce flicker. Original code by Julen Ibarretxe Uriguen - Custom shaped window code - by the Xojo community.

github xojo mask

Here’s the code (from this forum) to get rid of the system interface that’s working: I have used the CustomWindowShape example included with Xojo and have managed to get part of it working (the shape and no system UI) but I can’t get the image I’m using for the window background to reflect the transparency drop shadow gradient of the png file. I want it cross platform but am currently just trying to get it to work on Win32. I’m trying to make a floating window that has rounded corners and a drop shadow and has no system colors, borders or buttons etc.














Github xojo mask