[VB.NET]自定義.NET WindowForm表單介面(三)
<DllImport("user32.dll", SetLastError:=True)> _
Private Shared Function SetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer, ByVal dwNewLong As Integer) As Integer End Function
Public Const WS_SYSMENU As Integer = &H80000
Const WS_MINIMIZEBOX As Integer = &H20000
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim winLong As Integer = GetWindowLong(New HandleRef(Me, Me.Handle), -16)
SetWindowLong(New HandleRef(Me, Me.Handle), -16, winLong Or WS_SYSMENU Or WS_MINIMIZEBOX)
End Sub</pre></div>