supportmodule.bas

来自「功能强大的 DBF 数据库操作 dll,可以让 VB 和 POWERBASIC 」· BAS 代码 · 共 65 行

BAS
65
字号
Attribute VB_Name = "Module2"
  
'in a real application you should make the
'database handles PUBLIC so they could be accessed
'from other forms/modules in the application. I prefer
'to keep the variables in a TYPE record in order to keep
'the database and index handles grouped together.

Type CustomerHandles
  dbFileName As String  'name of customer database
  idxFileName As String 'name of customer index
  dbHandle As Long   'Cheetah database handle (customer database)
  idxHandle As Long  'Cheetah index handle (CUSTID index)
  'we could add other index handles here if we wish
  '...
  '...
  '...
End Type


Public cust As CustomerHandles



'millisecond accurate timer taken from www.vb2themax.com

Private Type SMPTE
    hour As Byte
    min As Byte
    sec As Byte
    frame As Byte
    fps As Byte
    dummy As Byte
    pad(2) As Byte
End Type

Private Type MMTIME
    wType As Long
    units As Long
    smpteVal As SMPTE
    songPtrPos As Long
End Type

Private Declare Function timeGetSystemTime Lib "winmm.dll" (lpTime As MMTIME, ByVal uSize As Long) As Long

'return the current system time (in milliseconds)

Public Function GetCurrentTime() As Long
    Const TIME_MS = 1
    Dim mmt As MMTIME
    mmt.wType = TIME_MS
    timeGetSystemTime mmt, LenB(mmt)
    GetCurrentTime = mmt.units
End Function




Public Sub AddMessage(msg$)

  frmMainForm.lstOutput.AddItem msg$

End Sub

⌨️ 快捷键说明

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