Declare Function SetSysModalWindow Lib "User" (ByVal hWnd As
Integer) As Integer
然后调用:oldSysModal =
SetSysModalWindow([Form].hWnd)
2.获取驱动器类型
代码如后:
Declare Function GetDriveType Lib “Kernel" (ByVal nDrive As Integer)
As Integer Global Const DRIVE_REMOVEABLE% = 2, DRIVE_FIXED% =
3 Global Const DRIVE_REMOTE% =
4
3.表单在对中
本子程序功能使表单定位在屏幕中央,在表单中任何需要表单对中的地方只需加入一行代码:
“centerwindow.me”即可成功调用。
Public Sub CenterWindow(f As Form) f.Top = (Screen.Height * .5) -
(f.Height * .5) f.Left = (Screen.Width * .5) - (f.Width * .5) End
Sub