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

📄 findcustomize.frm

📁 这是我的一个课题:我省农业分布调查咨询系统。课题是和省农业厅合作的。源代码完整
💻 FRM
📖 第 1 页 / 共 3 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form FindCustomize 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "四川省农业基础资源空间信息查询系统  自定义查询"
   ClientHeight    =   3255
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   3810
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3255
   ScaleWidth      =   3810
   StartUpPosition =   2  '屏幕中心
   Begin MSComctlLib.ProgressBar ProBar1 
      Height          =   255
      Left            =   0
      TabIndex        =   9
      Top             =   3000
      Visible         =   0   'False
      Width           =   3855
      _ExtentX        =   6800
      _ExtentY        =   450
      _Version        =   393216
      Appearance      =   1
   End
   Begin VB.ComboBox selectyearCombo1 
      Height          =   300
      Left            =   480
      Style           =   2  'Dropdown List
      TabIndex        =   8
      Top             =   1200
      Width           =   1935
   End
   Begin VB.CheckBox Checkequal 
      Caption         =   "等于"
      Height          =   255
      Left            =   2880
      TabIndex        =   4
      Top             =   1440
      Value           =   1  'Checked
      Width           =   735
   End
   Begin VB.TextBox FindValueText 
      Height          =   270
      Left            =   480
      TabIndex        =   3
      Text            =   "Text1"
      Top             =   1920
      Width           =   1335
   End
   Begin VB.ComboBox FindFieldCombo 
      Height          =   300
      ItemData        =   "FindCustomize.frx":0000
      Left            =   480
      List            =   "FindCustomize.frx":0002
      Style           =   2  'Dropdown List
      TabIndex        =   2
      Top             =   480
      Width           =   1935
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "取消"
      Height          =   375
      Left            =   2160
      TabIndex        =   1
      Top             =   2400
      Width           =   975
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "确定"
      Height          =   375
      Left            =   720
      TabIndex        =   0
      Top             =   2400
      Width           =   975
   End
   Begin VB.Frame Frame2 
      Caption         =   "运算符"
      Height          =   2295
      Left            =   2640
      TabIndex        =   5
      Top             =   0
      Width           =   1095
      Begin VB.OptionButton Optionless 
         Caption         =   "小于"
         Enabled         =   0   'False
         Height          =   180
         Left            =   240
         TabIndex        =   7
         Top             =   480
         Width           =   735
      End
      Begin VB.OptionButton Optionmore 
         Caption         =   "大于"
         Enabled         =   0   'False
         Height          =   180
         Left            =   240
         TabIndex        =   6
         Top             =   960
         Width           =   735
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "查询"
      Height          =   2295
      Left            =   120
      TabIndex        =   10
      Top             =   0
      Width           =   2535
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Height          =   180
         Left            =   1770
         TabIndex        =   14
         Top             =   1950
         Width           =   90
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "请选择您想查询的年份:"
         Height          =   180
         Left            =   120
         TabIndex        =   13
         Top             =   960
         Width           =   1980
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "输入您想查询的值:"
         Height          =   180
         Left            =   120
         TabIndex        =   12
         Top             =   1680
         Width           =   1620
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "请选择您想查询的类别:"
         Height          =   180
         Left            =   120
         TabIndex        =   11
         Top             =   240
         Width           =   1980
      End
   End
End
Attribute VB_Name = "FindCustomize"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CancelButton_Click()
Unload FindCustomize
End Sub
Private Sub FindFieldCombo_Click()
Select Case FindFieldCombo.Text
       Case "县名", "行政代码", "邮政编码"
       Checkequal.Enabled = True
       Checkequal.Value = 1
       Frame2.Enabled = False
       Optionmore.Enabled = False
       Optionless.Enabled = False
       If selectyearCombo1.List(0) <> "不选年份" Then
          selectyearCombo1.AddItem "不选年份", 0
       End If
       Case "土地面积"
       Checkequal.Enabled = True
       Checkequal.Value = 1
       Frame2.Enabled = True
       Optionmore.Enabled = True
       Optionless.Enabled = True
       If selectyearCombo1.List(0) <> "不选年份" Then
          selectyearCombo1.AddItem "不选年份", 0
       End If

       Case "播种面积", "耕地面积", "县总人口", "非农业人口", "农村人口", "男性人口", "女性人口", "从业人员", "农民人均纯收入", "粮食总产", "国内生产总值", "第一产业产值", "第二产业产值", "第三产业产值", "种植业产值", "牧业产值", "林业产值", "乡镇企业产值"
       Checkequal.Enabled = True
       Checkequal.Value = 1
       Frame2.Enabled = True
       Optionmore.Enabled = True
       Optionless.Enabled = True
       If selectyearCombo1.List(0) = "不选年份" Then
          selectyearCombo1.RemoveItem (0)
       End If
End Select
selectyearCombo1.ListIndex = 0
If FindFieldCombo.Text = "土地面积" Then
   Label4.Caption = "平方公里"
Else
   If FindFieldCombo.Text = "播种面积" Or FindFieldCombo.Text = "耕地面积" Then
      Label4.Caption = "亩"
   Else
      If FindFieldCombo.Text = "农民人均纯收入" Then
         Label4.Caption = "元"
      Else
         If FindFieldCombo.Text = "粮食总产" Then
            Label4.Caption = "吨"
         Else
            If FindFieldCombo.Text = "非农业人口" Then
               Label4.Caption = "万人"
            Else
                If FindFieldCombo.Text = "县总人口" Or FindFieldCombo.Text = "农村人口" Or FindFieldCombo.Text = "男性人口" Or FindFieldCombo.Text = "女性人口" Or FindFieldCombo.Text = "从业人员" Then
                  Label4.Caption = "人"
                Else
                    If FindFieldCombo.Text = "国内生产总值" Or FindFieldCombo.Text = "第一产业产值" Or FindFieldCombo.Text = "第二产业产值" Or FindFieldCombo.Text = "第三产业产值" Or FindFieldCombo.Text = "种植业产值" Or FindFieldCombo.Text = "牧业产值" Or FindFieldCombo.Text = "林业产值" Or FindFieldCombo.Text = "乡镇企业产值" Then
                       Label4.Caption = "万元"
                    Else
                       Label4.Caption = ""
                    End If
                End If
             End If
          End If
       End If
    End If
End If
End Sub
Private Sub FindValueText_Change()
If FindValueText.Text = "" Then
   OKButton.Enabled = False
Else
   OKButton.Enabled = True
End If

End Sub

Private Sub FindValueText_LostFocus()
'If FindValueText.Text = "" Then
'   OKButton.Enabled = False
'Else
'   OKButton.Enabled = True
'End If
End Sub


Private Sub Form_Load()
FindFieldCombo.Clear
FindValueText.Text = ""
FindFieldCombo.AddItem "县名"   '字符型
FindFieldCombo.AddItem "行政代码" '字符型
FindFieldCombo.AddItem "邮政编码" '字符型
FindFieldCombo.AddItem "土地面积" '数字型
FindFieldCombo.AddItem "播种面积" '数字型
FindFieldCombo.AddItem "耕地面积" '数字型
FindFieldCombo.AddItem "县总人口" '数字型
FindFieldCombo.AddItem "非农业人口" '数字型
FindFieldCombo.AddItem "农村人口"   '数字型
FindFieldCombo.AddItem "男性人口" '数字型
FindFieldCombo.AddItem "女性人口" '数字型
FindFieldCombo.AddItem "从业人员" '数字型
FindFieldCombo.AddItem "农民人均纯收入" '数字型
FindFieldCombo.AddItem "粮食总产" '数字型

⌨️ 快捷键说明

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