# Examples for Windows

## Flash app indicator in Task Bar

``` xojo
Declare Function FlashWindow Lib "User32" (HWND As Ptr, invert As Boolean) As Boolean
Call FlashWindow(MyWindow.Handle, True) ' flash once
```

## Enable window compositing

``` xojo
Sub EnableComposite(w As DesktopWindow)
  #If TargetWindows
    Const GWL_EXSTYLE = -20
    Const WS_EX_COMPOSITED = &h2000000

    Declare Function GetWindowLongW Lib "user32" (hwnd As Ptr, nIndex As Int32) As Integer
    Var style As Integer = GetWindowLongW(w.Handle, GWL_EXSTYLE)
    style = BitwiseOr(style, WS_EX_COMPOSITED)

    Declare Sub SetWindowLongW Lib "user32" (hwnd As Ptr, nIndex As Int32, dwNewLong As Integer)
    SetWindowLongW(w.Handle, GWL_EXSTYLE, style)
  #EndIf
End Sub
```

## Declare example projects

These can be found in Examples/Topics/Declares.

## Other resources

These external sources of information might also be helpful when working with Declares on Windows:

- [WinAPILib library on GitHub](https://github.com/paullefebvre/winapilib)
- [Calling Native Windows APIs](https://documentation.xojo.com/topics/declares/calling_native_windows_apis.html)
- [Windows Functionality Suite on GitHub](https://github.com/arbp/WFS)
- [Windows APIs to Xojo data type conversion](https://blog.samphire.net/2017/01/22/windows-to-xojo-data-type-conversion/)
- [Implement Declares with Xojo on Windows book from xDevLibrary](http://www.xdevlibrary.com/)

<div id="/topics/declares/examples_for_windows/see_also">

<div class="seealso">

`Declare</api/language/declare>`

</div>

</div>
