Code:
 Copy Code
// Handle window activation.
if (message == WM_ACTIVATE)
{
    // Extend the frame into the client area.
    MARGINS margins;

    margins.cxLeftWidth = LEFTEXTENDWIDTH;      //8
    margins.cxRightWidth = RIGHTEXTENDWIDTH;    //8
    margins.cyBottomHeight = BOTTOMEXTENDWIDTH; //20
    margins.cyTopHeight = TOPEXTENDWIDTH;       //27

    hr = DwmExtendFrameIntoClientArea(hWnd, &margins);

    if (!SUCCEEDED(hr))
    {
        // Handle error.
    }

    fCallDWP = true;
    lRet = 0;
}
I've tried something like this:

vb.net Code:
  1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.         Dim msg As New Message()
  3.         Dim hWnd As New IntPtr(1501598)
  4.         msg = Message.Create(hWnd, msg.Msg, msg.WParam, msg.LParam)
  5.  
  6.     End Sub
  7.  
  8.     Private Function LRESULT_CALLBACK_WndProc(ByVal hWnd As IntPtr, ByVal message As UInteger, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
  9.  
  10.  
  11.     End Function

But it does nothing, I don't know what im supposed to do lol..

I am trying to change the colour of my window frame & buttons etc...

Thanks