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

📄 frmarrearageusermanage_select.frm

📁 自来水公司的一个管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form frmArrearageUserManage_Select 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "欠费用户选择"
   ClientHeight    =   2145
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4740
   Icon            =   "frmArrearageUserManage_Select.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2145
   ScaleWidth      =   4740
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton cmdCancle 
      Caption         =   "放弃"
      Height          =   360
      Left            =   1305
      TabIndex        =   5
      Top             =   1590
      Width           =   1050
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Height          =   360
      Left            =   270
      TabIndex        =   6
      Top             =   1590
      Width           =   1050
   End
   Begin VB.Frame Frame1 
      Caption         =   "计费月份"
      ForeColor       =   &H00800000&
      Height          =   1290
      Index           =   0
      Left            =   195
      TabIndex        =   0
      Top             =   90
      Width           =   4320
      Begin VB.OptionButton optMonthSelect 
         Caption         =   "指定月份"
         Height          =   210
         Index           =   1
         Left            =   180
         TabIndex        =   8
         Top             =   690
         Width           =   1020
      End
      Begin VB.OptionButton optMonthSelect 
         Caption         =   "全部月份"
         Height          =   210
         Index           =   0
         Left            =   180
         TabIndex        =   7
         Top             =   330
         Value           =   -1  'True
         Width           =   2655
      End
      Begin VB.ComboBox cmbMonth 
         Height          =   300
         ItemData        =   "frmArrearageUserManage_Select.frx":0442
         Left            =   2775
         List            =   "frmArrearageUserManage_Select.frx":0444
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   660
         Width           =   990
      End
      Begin MSMask.MaskEdBox txtYear 
         Height          =   300
         Left            =   1230
         TabIndex        =   1
         Top             =   660
         Width           =   1095
         _ExtentX        =   1931
         _ExtentY        =   529
         _Version        =   393216
         MaxLength       =   4
         Mask            =   "9999"
         PromptChar      =   " "
      End
      Begin VB.Label Label1 
         Caption         =   "月份"
         Height          =   210
         Index           =   3
         Left            =   3810
         TabIndex        =   4
         Top             =   720
         Width           =   435
      End
      Begin VB.Label Label1 
         Caption         =   "年"
         Height          =   210
         Index           =   2
         Left            =   2460
         TabIndex        =   3
         Top             =   720
         Width           =   210
      End
   End
   Begin VB.Line Line1 
      BorderColor     =   &H80000003&
      Index           =   0
      X1              =   150
      X2              =   4590
      Y1              =   1455
      Y2              =   1455
   End
   Begin VB.Line Line1 
      BorderColor     =   &H80000005&
      Index           =   1
      X1              =   150
      X2              =   4605
      Y1              =   1470
      Y2              =   1470
   End
End
Attribute VB_Name = "frmArrearageUserManage_Select"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public strReturmYearMonth As String        '返回值-年月字符串(注:"" 没有确定返回,"999999" 全部月份,"yyyymm" 指定月份)

Private Sub cmdCancle_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
    If Me.optMonthSelect(0).value = True Then
       strReturmYearMonth = "999999"
    Else
        strReturmYearMonth = Trim(Str(Me.txtYear.Text)) & Me.cmbMonth.Text
    End If
    Unload Me
End Sub

Private Sub Form_Load()
    txtYear.Text = "    "
    Call ClearMonth
    Me.txtYear.Enabled = False
    Me.cmbMonth.Enabled = False
    Me.optMonthSelect(0).value = True
    
    strReturmYearMonth = ""
End Sub

Private Sub FillMonth()
    cmbMonth.Clear
    cmbMonth.AddItem ("01")
    cmbMonth.AddItem ("02")
    cmbMonth.AddItem ("03")
    cmbMonth.AddItem ("04")
    cmbMonth.AddItem ("05")
    cmbMonth.AddItem ("06")
    cmbMonth.AddItem ("07")
    cmbMonth.AddItem ("08")
    cmbMonth.AddItem ("09")
    cmbMonth.AddItem ("10")
    cmbMonth.AddItem ("11")
    cmbMonth.AddItem ("12")
    cmbMonth.ListIndex = Month(Date) - 1
End Sub

Private Sub ClearMonth()
    cmbMonth.Clear
End Sub

Private Sub optMonthSelect_Click(Index As Integer)
    Select Case Index
    Case 0  '全部月份
        Me.txtYear.Text = ""
        Call ClearMonth
        Me.txtYear.Enabled = False
        Me.cmbMonth.Enabled = False
        
    Case 1  '指定月份
        Me.txtYear.Text = Trim(Str(Year(Date)))
        Call FillMonth
        Me.txtYear.Enabled = True
        Me.cmbMonth.Enabled = True
        Me.txtYear.SetFocus
        
    End Select
End Sub

Private Sub txtYear_GotFocus()
    Call AutoSelectText(txtYear)
End Sub

Private Sub txtYear_KeyPress(KeyAscii As Integer)
    Call IfEnterKeyMoveNext(KeyAscii)
End Sub

Private Sub txtYear_LostFocus()
    If Me.txtYear.Text < 1000 Or Me.txtYear.Text > 9999 Then
        Warning "日期格式输入错误!!!"
        Me.txtYear.SetFocus
        Exit Sub
    End If
End Sub

Private Sub cmbMonth_KeyPress(KeyAscii As Integer)
    Call IfEnterKeyMoveNext(KeyAscii)
End Sub

⌨️ 快捷键说明

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