📄 刷卡记录.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "刷卡记录"
ClientHeight = 3315
ClientLeft = 60
ClientTop = 345
ClientWidth = 4770
LinkTopic = "Form1"
ScaleHeight = 3315
ScaleWidth = 4770
StartUpPosition = 3 '窗口缺省
Visible = 0 'False
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 300
Left = 480
Top = 120
End
Begin VB.Data datCtl
Caption = "Data1"
Connect = "Access"
DatabaseName = "ybbb.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 840
Options = 0
ReadOnly = 0 'False
RecordsetType = 0 'Table
RecordSource = "rec"
Top = 0
Width = 1575
End
Begin VB.Timer Timer1
Interval = 1000
Left = 0
Top = 0
End
Begin VB.Image Image2
Height = 2655
Left = 3000
Top = 480
Width = 1455
End
Begin VB.Label L1
DataField = "time"
DataSource = "datCtl"
Height = 375
Left = 2760
TabIndex = 0
Top = 120
Width = 1695
End
Begin VB.Image Image1
DataField = "rec"
DataSource = "datCtl"
Height = 2415
Left = 120
Top = 720
Width = 1815
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function FindWindow Lib "USER32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Const vbDBName As Byte = 1
Private Const vbPicture As Byte = 2
Private bDirty(1 To 2) As Boolean
Private Sub Timer1_Timer()
Dim a, b As Integer
a = FindWindow(vbNullString, "门诊发票打印")
b = FindWindow(vbNullString, "提示")
If a > 0 And b = 0 Then
Set Image2.Picture = CaptureActiveWindow()
End If
If a <> 0 And b <> 0 Then
datCtl.Recordset.AddNew
Set Image1.Picture = Image2.Picture
L1.Caption = Now
datCtl.Recordset.Update
datCtl.Recordset.Bookmark = datCtl.Recordset.LastModified
Timer1.Enabled = False
Timer2.Enabled = True
End If
End Sub
Private Sub Timer2_Timer()
Dim a, b As Integer
a = FindWindow(vbNullString, "门诊发票打印")
b = FindWindow(vbNullString, "提示")
If a = 0 And b = 0 Then
Timer1.Enabled = True
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -