蛋糕碎片有什么用:VB中如何用关闭按纽实现最小化??????
来源:百度文库 编辑:中科新闻网 时间:2024/04/29 23:01:26
就象FLASHGET一样的
添加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
按纽事件中将宽度和高度都设置为0