Horje
Windows Presentation Foundation dark title bar Code Example
Windows Presentation Foundation dark title bar
' Note: This is supported on Windows 10 and higher

Imports System.Runtime.InteropServices
    
Class Example
    
	<DllImport("dwmapi.dll", PreserveSig:=True)>
	Public Shared Function DwmSetWindowAttribute(hwnd As IntPtr, attr As Integer, ByRef attrValue As Integer, attrSize As Integer) As Integer
	End Function
    
	' Use this line for WPF. Value of true makes the title bar dark, false is normal. Note that Me is the window you want to apply the dark title bar to
	InteropHelper.DwmSetWindowAttribute(New Interop.WindowInteropHelper(Me).Handle, 20, True, Runtime.InteropServices.Marshal.SizeOf(True))

    ' Use this line for Windows Forms. Value of true makes the title bar dark, false is normal. Note that Me is the form you want to apply the dark title bar to
	InteropHelper.DwmSetWindowAttribute(New Me.Handle, 20, True, Runtime.InteropServices.Marshal.SizeOf(True))

    
End Class
    




Vb

Related
how to self delete a vbscript file Code Example how to self delete a vbscript file Code Example
Handling a click event anywhere inside a panel vb Code Example Handling a click event anywhere inside a panel vb Code Example
find database connection string vb Code Example find database connection string vb Code Example
VBA OR vb6 find OR replace string from the end Code Example VBA OR vb6 find OR replace string from the end Code Example
method showalldata of object _worksheet failed vba Code Example method showalldata of object _worksheet failed vba Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7