⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modulewintop.bas

📁 一套完整的库存管理系统,是用vb开发的,适合初学者试用
💻 BAS
字号:
Attribute VB_Name = "ModuleWinTop"
'使窗体始终保持在最前面
Public Declare Function SetWindowPos Lib "user32" _
         (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
          ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Const HWND_TOPMOST = -1
Const SWP_NOMOVE = &H2
Const SWP_NOSIZE = &H1
Public Function PutWindowOnTop(pFrm As Form)
  Dim lngWindowPosition As Long
  lngWindowPosition = SetWindowPos(pFrm.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
End Function
Sub delay(ByVal n As Single)
    Dim tm1 As Single, tm2 As Single
    tm1 = Timer
    Do
        tm2 = Timer
        If tm2 < tm1 Then tm2 = tm2 + 86400
        If tm2 - tm1 > n Then Exit Do
        DoEvents
    Loop
End Sub
Sub Main()
    ' 显示"标志",并且等待 2 秒
  MDIFrmMain.Show
    delay 0.9
  FrmHY.Show
    delay 2
    Unload FrmHY
    ' 显示"登录"窗体,采取强制响应方式
 '   frmLogin.Show vbModal
 ' If Not frmLogin.cmdOK Then
 '       MsgBox "未完成用户名称和密码输入", vbCritical
 '       End
 '  End If
 '   Unload frmLogin
    
    ' 显示"主"窗体
  '  Form1.Show
    
    ' Sub Main() 的工作大功告成
End Sub


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -