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

📄 frm_gzffinfo.frm

📁 主要是实现物业管理功能!可以帮助了解该区的相关物业情况
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      HeadLines       =   1
      RowHeight       =   15
      AllowAddNew     =   -1  'True
      AllowDelete     =   -1  'True
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "Frm_gzffinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private ObjOldWidth As Long  '保存窗体的原始宽度
Private ObjOldHeight As Long '保存窗体的原始高度
Private ObjOldFont As Single '保存窗体的原始字体比
Private Sub Combo1_DblClick()
Combo1.Enabled = False
End Sub

Private Sub Form_Load()
Call ResizeInit(Me)
With DataGrid1
 .Columns(7).Visible = False
 .Columns(9).Visible = False
 .Columns(8).Visible = False
  .Columns(10).Visible = False
 .Columns(12).Visible = False
 End With
End Sub

Private Sub GurhanCoolButton1_CLICKED()
Frm_gzlr.Show
End Sub

Private Sub GurhanCoolButton2_CLICKED()
'Adodc1.RecordSource = "select * from tab_dianmoney where 计费起始日期='" + Str(DTPicker1.Value) + "'and 计费终止日期='" + Str(DTPicker2.Value) + "'"
If Text1.Enabled = True And Combo1.Enabled = True And DTPicker1.Enabled = True Then
Adodc1.RecordSource = "select * from tab_工资 where 姓名='" & Trim(Text1.Text) & "'And 所在部门='" & Trim(Combo1.Text) & "' And 日期='" & Trim(DTPicker1.Value) & "'"
Adodc1.Refresh
 If Adodc1.Recordset.RecordCount = 0 Then
  Call tip
 End If


End If

If Text1.Enabled = True And Combo1.Enabled = True And DTPicker1.Enabled = Fals Then
Adodc1.RecordSource = "select * from tab_工资 where 姓名='" & Trim(Text1.Text) & "'and 所在部门='" & Trim(Combo1.Text) & "'"
Adodc1.Refresh
 If Adodc1.Recordset.RecordCount = 0 Then
  Call tip
 End If
End If

If Combo1.Enabled = True And DTPicker1.Enabled = True And Text1.Enabled = False Then
 Adodc1.RecordSource = "select * from tab_工资 where 所在部门='" & Trim(Combo1.Text) & "'and 日期='" & Trim(DTPicker1.Value) & "'"
 Adodc1.Refresh
  If Adodc1.Recordset.RecordCount = 0 Then
  Call tip
 End If

End If

If Text1.Enabled = True And DTPicker1.Enabled = True And Combo1.Enabled = False Then
Adodc1.RecordSource = "select * from tab_工资 where 姓名='" & Trim(Text1.Text) & "'and 日期='" & Trim(DTPicker1.Value) & "'"
Adodc1.Refresh
 If Adodc1.Recordset.RecordCount = 0 Then
  Call tip
 End If

End If

If Text1.Enabled = True And Combo1.Enabled = False And DTPicker1.Enabled = False Then
Adodc1.RecordSource = "select * from tab_工资 where 姓名='" & Text1.Text & "'"
Adodc1.Refresh
 If Adodc1.Recordset.RecordCount = 0 Then
  Call tip
 End If

End If

If Text1.Enabled = False And Combo1.Enabled = True And DTPicker1.Enabled = False Then
 Adodc1.RecordSource = "select * from tab_工资 where 所在部门='" & Combo1.Text & "'"
 Adodc1.Refresh
 If Adodc1.Recordset.RecordCount = 0 Then
  Call tip
 End If
 
 End If

If Text1.Enabled = False And Combo1.Enabled = False And DTPicker1.Enabled = True Then
 Adodc1.RecordSource = "select * from tab_工资 where 日期='" & DTPicker1.Value & "'"
 Adodc1.Refresh
 If Adodc1.Recordset.RecordCount = 0 Then
  Call tip
 End If

End If

If Text1.Enabled = False And Combo1.Enabled = False And DTPicker1.Enabled = False Then
 MsgBox "您没有设定任何的查询条件,请重新选择"
End If
With DataGrid1
 .Columns(7).Visible = False
 .Columns(9).Visible = False
 .Columns(8).Visible = False
  .Columns(10).Visible = False
 .Columns(12).Visible = False
 End With

End Sub




Private Sub GurhanCoolButton2_GotFocus()
Adodc1.RecordSource = "select * from tab_工资"
Adodc1.Refresh
With DataGrid1
 .Columns(7).Visible = False
 .Columns(9).Visible = False
 .Columns(8).Visible = False
  .Columns(10).Visible = False
 .Columns(12).Visible = False
 End With
End Sub

Private Sub GurhanCoolButton6_CLICKED()
DataR1.Show
End Sub

Private Sub GurhanCoolButton7_CLICKED()
Unload Me

End Sub

Private Sub Label1_Click()
DTPicker1.Enabled = True

End Sub

Private Sub Label1_DblClick()
DTPicker1.Enabled = False
End Sub

Private Sub Label2_Click()
Combo1.Enabled = True
End Sub

Private Sub Label2_DblClick()
Combo1.Enabled = False
End Sub

Private Sub Label3_Click()
Text1.Enabled = True
End Sub

Private Sub Label3_DblClick()
Text1.Enabled = False
End Sub
 
Private Sub tip()
 MsgBox "sorry! 您要查询的信息不存在!请重新选择查询条件"
 Adodc1.RecordSource = "select * from tab_工资 "
 Adodc1.Refresh
 With DataGrid1
 .Columns(7).Visible = False
 .Columns(9).Visible = False
 .Columns(8).Visible = False
  .Columns(10).Visible = False
 .Columns(12).Visible = False
 End With
End Sub

'在调用ResizeForm前先调用本函数
Public Sub ResizeInit(FormName As Form)
  Dim Obj As Control
  
  ObjOldWidth = FormName.ScaleWidth
  ObjOldHeight = FormName.ScaleHeight
  ObjOldFont = FormName.Font.Size / ObjOldHeight
  On Error Resume Next
  For Each Obj In FormName
    Obj.Tag = Obj.Left & " " & Obj.Top & " " & Obj.Width & " " & Obj.Height & " "
  Next Obj
  
  On Error GoTo 0
End Sub

'按比例改变表单内各元件的大小,
'在调用ReSizeForm前先调用ReSizeInit函数
Public Sub ResizeForm(FormName As Form)

  Dim Pos(4) As Double
  Dim i As Long, TempPos As Long, StartPos As Long
  Dim Obj As Control
  Dim ScaleX As Double, ScaleY As Double
  
  ScaleX = FormName.ScaleWidth / ObjOldWidth
  '保存窗体宽度缩放比例
  ScaleY = FormName.ScaleHeight / ObjOldHeight
  '保存窗体高度缩放比例
  On Error Resume Next
  
  For Each Obj In FormName
    StartPos = 1
    For i = 0 To 4
      '读取控件的原始位置与大小
      TempPos = InStr(StartPos, Obj.Tag, " ", vbTextCompare)
      If TempPos > 0 Then
        Pos(i) = Mid(Obj.Tag, StartPos, TempPos - StartPos)
        StartPos = TempPos + 1
      Else
        Pos(i) = 0
      End If
      
      '根据控件的原始位置及窗体改变大
      '小的比例对控件重新定位与改变大小
      Obj.Move Pos(0) * ScaleX, Pos(1) * ScaleY, Pos(2) * ScaleX, Pos(3) * ScaleY
      Obj.Font.Size = ObjOldFont * FormName.ScaleHeight
    Next i
  
  Next Obj
  
  On Error GoTo 0
End Sub

Private Sub Form_Resize()
  '确保窗体改变时控件随之改变
  Call ResizeForm(Me)
End Sub

⌨️ 快捷键说明

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