VB.NET窗口最小化

前端之家收集整理的这篇文章主要介绍了VB.NET窗口最小化前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
        Const WM_SYSCOMMAND As Integer = &H112
        Const SC_CLOSE As Integer = &HF060
        Const SC_MINIMIZE As Integer = &HF020

        If m.Msg = WM_SYSCOMMAND And (m.WParam = SC_MINIMIZE Or m.WParam = SC_CLOSE) Then
            Me.Hide()
            Exit Sub
        End If
        MyBase.WndProc(m)
    End Sub
不加这个最小化后左下角仍会有个小窗口,并且有时还不能还原 原文链接:https://www.f2er.com/vb/259799.html

猜你在找的VB相关文章