老师,我想阻断BaseMainForm的最小化让其变成透明而不是最小化状态,以下代码,请帮忙看看哪里写错了,谢谢。Public Class MainForm
Inherits System.Windows.Forms.Form
Const WM_SYSCOMMAND As Long = &H112
Const SC_MINIMIZE As Long = &HF020
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_SYSCOMMAND AndAlso m.WParam.ToInt32() = SC_MINIMIZE AndAlso BaseMainForm.CanFocus AndAlso Application.OpenForms.Count = 1 Then
BaseMainForm.Opacity = 0
Return
End If
MyBase.WndProc(m)
End Sub
End Class