📄 frmtjxzl.frm
字号:
VERSION 5.00
Begin VB.Form frmLx
BorderStyle = 1 'Fixed Single
Caption = "帐本分类管理"
ClientHeight = 4650
ClientLeft = 45
ClientTop = 450
ClientWidth = 5520
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4650
ScaleWidth = 5520
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "确 定"
Height = 375
Left = 960
TabIndex = 7
Top = 4200
Width = 915
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "退 出"
Height = 375
Left = 3360
TabIndex = 6
Top = 4200
Width = 855
End
Begin VB.Frame Frame1
Caption = "已有类型"
Height = 4155
Left = 60
TabIndex = 0
Top = 60
Width = 5235
Begin VB.TextBox txtBz
Height = 2475
Left = 1860
MultiLine = -1 'True
TabIndex = 4
Top = 1260
Width = 3015
End
Begin VB.TextBox txtNew
Height = 315
Left = 1860
MultiLine = -1 'True
TabIndex = 2
Top = 480
Width = 3015
End
Begin VB.ListBox lstLx
Height = 3480
Left = 120
TabIndex = 1
ToolTipText = "删除/修改请点又键"
Top = 240
Width = 1575
End
Begin VB.Label Label2
Caption = "备 注:"
Height = 255
Left = 1860
TabIndex = 5
Top = 960
Width = 1335
End
Begin VB.Label Label1
Caption = "新种类:"
Height = 255
Left = 1860
TabIndex = 3
Top = 240
Width = 1335
End
End
Begin VB.Menu mun
Caption = "mun"
Visible = 0 'False
Begin VB.Menu LXDel
Caption = "删除"
End
Begin VB.Menu LXXgmc
Caption = "修改名称"
End
End
End
Attribute VB_Name = "frmLx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'Private Sub Command1_Click()
'If Trim(txtLx) <> "" Then
' Dim I As Integer
' For I = 0 To lstLx.ListCount - 1
' If lstLx.List(I) = Trim(txtLx) Then
' MsgBox "<" & Trim(txtLx) & ">已经存在!"
' Exit Sub
' End If
' Next
' AddZl txtLx, txtBz
' Unload Me
'Else
' MsgBox "请输入类型!"
'End If
'End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim I As Integer
For I = 0 To lstLx.ListCount - 1
If lstLx.List(I) = Trim(txtNew) Then
MsgBox lstLx.List(I) & "已经存在!"
Exit Sub
End If
Next
If KeyAscii = 13 Then
If Trim(txtNew.Text) <> "" Then
lstLx.AddItem Trim(txtNew), 0
txtNew = ""
End If
End If
End Sub
Private Sub Form_Load()
GetLxList
End Sub
Private Sub lstLx_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
'If lstLx.Text <> "" Then
If Button = 2 Then
If lstLx.ListCount < 1 Then
LXDel.Enabled = False
LXXgmc.Enabled = False
Else
If lstLx.ListIndex < 0 Then
LXDel.Enabled = False
LXXgmc.Enabled = False
Else
LXDel.Enabled = True
LXXgmc.Enabled = True
End If
End If
Me.PopupMenu mun
End If
'End If
End Sub
Private Sub LXDel_Click()
If lstLx.Text = "其他未归类" Then
MsgBox "该类型是数据库缺省类型,不能删除!", 48
Exit Sub
End If
If MsgBox("确定要把<" & lstLx.Text & ">删除吗?", vbOKCancel + 32 + vbDefaultButton2) = vbOK Then
DelLx lstLx.Text
lstLx.RemoveItem lstLx.ListIndex
End If
End Sub
Sub GetLxList()
Dim Zh() As String
Dim Tmp
On Error GoTo Er
GetList "帐本表", "帐本", Zh ', "类型编号<>12"
lstLx.Clear
For Each Tmp In Zh
lstLx.AddItem Tmp
Next
Exit Sub
Er:
Command1.Enabled = False
End Sub
Private Sub LXXgmc_Click()
Dim NewLx As String
NewLx = InputBox("请输入新类型名称")
NewLx = Trim(NewLx)
If NewLx <> "" Then
'UpdateLx lstLx.Text, NewLx
'GetLxList
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -