摘要: 窗口句柄会找吧? Try DwmExtendFrameIntoClientArea(Me.Handle, New Margins() With {.Bottom = -1, .Left = -1, .Right = -1, .Top = -1}) Catch ex As Exception End Try为啥要用Try嵌套呢?因为在没有 DwmApi.dll 时会引发 DllNotFoundException,在找不到入口点时会引发 EntryPointNotFoundException,在返回非 0 的HRESULT 时会 Marshal.ThrowForHR。添加了Try嵌套会使代码灵活性 阅读全文