VB中如何用关闭按纽实现最小化?
2023-2-15 乱云飞
添加API声明:Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long 在Form_QueryUnload()事件中,将窗体最小化,然后取消程序关闭。 最小化的方法是: I = ShowWindow(Me.hwnd, 6) 代码如下: Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) I = ShowWindow(Me.hwnd, 6) Cancel = True End Sub本文链接:http://80c.cc/ez/628.html
发表评论: