📄 form_time.frm
字号:
Caption = "T:"
BeginProperty Font
Name = "MS Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 4560
TabIndex = 59
Top = 4800
Width = 255
End
Begin VB.Label Label7
Caption = "Head2 OSC:"
Height = 375
Left = 6240
TabIndex = 58
Top = 840
Width = 615
End
Begin VB.Label Label6
Caption = "Head2 Idle:"
Height = 375
Left = 8280
TabIndex = 57
Top = 840
Width = 735
End
Begin VB.Label Label5
Caption = "Head1 B1 Idle:"
Height = 375
Left = 4080
TabIndex = 56
Top = 840
Width = 735
End
Begin VB.Label l
Caption = "Head1 B1 OSC:"
Height = 375
Left = 2280
TabIndex = 55
Top = 840
Width = 855
End
Begin VB.Label Label4
Caption = "Osc time:"
Height = 495
Left = 2400
TabIndex = 54
Top = 5880
Width = 855
End
Begin VB.Label Lbl_t
Caption = "T Tole:"
BeginProperty Font
Name = "MS Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 255
Left = 4080
TabIndex = 53
Top = 6480
Width = 615
End
Begin VB.Label Label13
Caption = "0 Osc time:"
BeginProperty Font
Name = "MS Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 2280
TabIndex = 52
Top = 3480
Width = 615
End
Begin VB.Label Label14
Caption = "0 Idle time:"
BeginProperty Font
Name = "MS Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4200
TabIndex = 51
Top = 3480
Width = 855
End
Begin VB.Label Label15
Caption = "1 Osc time:"
BeginProperty Font
Name = "MS Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6120
TabIndex = 50
Top = 3480
Width = 855
End
Begin VB.Label Label18
Caption = "Osc:"
BeginProperty Font
Name = "MS Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2400
TabIndex = 49
Top = 4680
Width = 375
End
Begin VB.Label Label19
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Wait time:"
BeginProperty Font
Name = "MS Serif"
Size = 13.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 840
TabIndex = 47
Top = 7080
Width = 1320
End
End
Begin VB.CommandButton Cmd_close
Caption = "&Close"
Height = 495
Left = 8160
TabIndex = 48
Top = 9720
Width = 735
End
Begin VB.Label lAddFmt
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Add or Modify's IR Format:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 13.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = -1560
TabIndex = 97
Top = 120
Visible = 0 'False
Width = 5985
End
End
Attribute VB_Name = "Form_time"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub bAddFmt_Click()
Dim sRpt As String
sRpt = ""
DBEngine.DefaultType = dbUseJet
Set Newdb = OpenDatabase("IRTime.mdb")
'Set tbls = Newdb.TableDefs
Set tdfIRFormat = Newdb!Type
With tdfIRFormat
Set idxFormat = .CreateIndex("idxFormat")
idxFormat.Fields.Append .CreateField("Format")
'.Indexes.Append idxFormat 'the first time need then no need
End With
Set record1 = tdfIRFormat.OpenRecordset
record1.Index = "idxFormat"
'On Error Resume Next
If cAddFmt.Text = "" Then
Exit Sub
End If
record1.Seek "=", cAddFmt.Text
record1.Edit
record1!stru = tStru.Text
record1!H_Osc = tHeadOsc.Text
record1!H_Idle = tHeadIdle.Text
record1!G2H_Osc = tHead1Osc.Text
record1!G2H_Idle = tHead1Idle.Text
record1!HB2_Osc = tH1B2Osc.Text
record1!HB2_Idle = tH1B2Idle.Text
record1!Alias = tAlias.Text
record1!Type = tType.Text
record1!H_Bits = tHBits.Text
record1!S_Bits = tSbits.Text
'record1!Addr = tAddrBit.Text
record1!T = tTbits.Text
record1!Instance = tTcode.Text
record1!F = tFixBits.Text
record1!Fix_Time = tFixTime.Text
record1!f_sit = tFixCode.Text
record1!Zero_Osc = t0Osc.Text
record1!zero_Idle = t0Idle.Text
record1!One_Osc = t1Osc.Text
record1!One_Idle = t1Idle.Text
record1!C = tCBits.Text
record1!R_C = tRCBits.Text
record1!D = tDBits.Text
record1!R_D = tRDbits.Text
record1!CF_T = tCF.Text
record1!CF_Osc = tCFOsc.Text
record1!T1 = tT1.Text
record1!G2_T = Form_time.tT2.Text
record1!E_Osc = Form_time.tEOsc.Text
record1!E_Idle = Form_time.tEIdle.Text
record1!b_end = Form_time.tLastOsc.Text
record1!X = Form_time.tXTime.Text
If cGroup.Value = 1 Then
sRpt = "G"
End If
If cData.Value = 1 Then
If sRpt <> "" Then
sRpt = sRpt + "&D"
Else
sRpt = "D"
End If
End If
If cHead.Value = 1 Then
If sRpt <> "" Then
sRpt = sRpt + "&H"
Else
sRpt = "H"
End If
End If
If cEndbit.Value = 1 Then
If sRpt <> "" Then
sRpt = sRpt + "&E"
Else
sRpt = "E"
End If
End If
If c2ndB.Value = 1 Then
If sRpt <> "" Then
sRpt = sRpt + "&B0"
Else
sRpt = "B0"
End If
End If
If cG2RptB.Value = 1 Then
If sRpt <> "" Then
sRpt = sRpt + "&2T"
Else
sRpt = "2T"
End If
End If
record1!Repeat = sRpt
If cCYes.Value = 1 Then
record1!convert = "Y"
Else
record1!convert = "N"
End If
If tGroups.Text <> "" Then
record1!G_count = tGroups.Text
End If
If tRemark.Text <> "" Then
record1!Remark = tRemark.Text
End If
record1.Update
End Sub
Private Sub cAddFmt_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then
Unload Me
End If
End Sub
Private Sub Cmd_close_Click()
Unload Me
End Sub
Private Sub Chk_spe1_Click()
If Chk_spe1.Value = 1 Then
Lbl_pos1.Visible = True
Txt_pos1.Visible = True
Lbl_num1.Visible = True
Txt_num1.Visible = True
Else
Lbl_pos1.Visible = False
Txt_pos1.Visible = False
Lbl_num1.Visible = False
Txt_num1.Visible = False
End If
If (Cboirtype.ListIndex = 1 And Chk_spe1.Value = 1) Then ' hl format
Lbl_addHL_T.Visible = True
Txt_addHL_T.Visible = True
Else
Lbl_addHL_T.Visible = False
Txt_addHL_T.Visible = False
End If
End Sub
Private Sub Cmd_close_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then
Unload Me
End If
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then
Unload Me
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
lAddFmt.Visible = False
cAddFmt.Visible = False
bAddFmt.Visible = False
Close
End Sub
Private Sub Chk_spe2_Click()
If Chk_spe2.Value = 1 Then
Lbl_pos2.Visible = True
Txt_pos2.Visible = True
Lbl_num2.Visible = True
Txt_num2.Visible = True
Else
Lbl_pos2.Visible = False
Txt_pos2.Visible = False
Lbl_num2.Visible = False
Txt_num2.Visible = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -