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

📄 lsjl1frm.frm

📁 用于控制氧乐果生产的程序
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      TabIndex        =   20
      Top             =   132
      Width           =   516
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "请输入查询日期:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   48
      TabIndex        =   19
      Top             =   132
      Width           =   1920
   End
   Begin VB.Image Image1 
      BorderStyle     =   1  'Fixed Single
      Height          =   504
      Left            =   0
      Top             =   0
      Width           =   4212
   End
   Begin VB.Image Image3 
      BorderStyle     =   1  'Fixed Single
      Height          =   4580
      Left            =   0
      Top             =   540
      Width           =   7320
   End
   Begin VB.Label Label11 
      AutoSize        =   -1  'True
      Caption         =   "结束时间"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   216
      Left            =   4596
      TabIndex        =   16
      Top             =   600
      Width           =   864
   End
   Begin VB.Label Label10 
      AutoSize        =   -1  'True
      Caption         =   "开始时间"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   216
      Left            =   3564
      TabIndex        =   15
      Top             =   600
      Width           =   864
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      Caption         =   "一甲胺kg"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   216
      Left            =   708
      TabIndex        =   14
      Top             =   1200
      Width           =   864
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "日"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   3960
      TabIndex        =   13
      Top             =   132
      Width           =   264
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "月"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   3228
      TabIndex        =   12
      Top             =   132
      Width           =   264
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "年"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   2532
      TabIndex        =   11
      Top             =   132
      Width           =   264
   End
End
Attribute VB_Name = "lsjl1frm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private mfDate As Date
Private Const mstrSqlDetail = "select * from [detaills1] where riqi = "
Private Const mstrSqlBatch = "select * from [batchls1] where riqi = "

Private Sub cmdFirst_Click()
On Error Resume Next
With Data2.Recordset
    .MoveFirst
End With
End Sub

Private Sub cmdLast_Click()
On Error Resume Next
With Data2.Recordset
    .MoveLast
End With
End Sub

Private Sub cmdNext_Click()
On Error Resume Next
With Data2.Recordset
    If .EOF Then
        .MoveFirst
    Else
        .MoveNext
    End If
End With
End Sub

Private Sub cmdOption_Click()
With frmChartOption
    .fyfIndex = 1
    .Show vbModal
End With
End Sub

Private Sub cmdPrevious_Click()
On Error Resume Next
With Data2.Recordset
    If .BOF Then
        .MoveLast
    Else
        .MovePrevious
    End If
End With
End Sub
Private Sub Command5_Click()
Unload Me
End Sub

Private Sub Data2_Reposition()
On Error Resume Next
With Data1
    .RecordSource = mstrSqlDetail & "#" & 20 & mfDate & "#" & _
    "and currenttime>=" & "#" & Data2.Recordset.Fields("starttime") & "#" _
    & "and currenttime<=" & "#" & Data2.Recordset.Fields("endtime") & "#"
    .Refresh
    .Recordset.MoveFirst
End With
Text5.Text = Data2.Recordset.Fields("yjatouliaoliang")
Label14.Caption = Data2.Recordset.AbsolutePosition + 1
lblScale(0).Caption = Format(Data1.Recordset.Fields("currenttime"), "short time")

Call DrawLishiChart1(Picture1, Data1, gsngwdScale(1, 1), gsngwdScale(1, 2), _
gsngywScale(1, 1), gsngywScale(1, 2), gsngkdScale(1, 1), gsngkdScale(1, 2), _
gsngllScale(1, 1), gsngllScale(1, 2), gsngswdScale(1, 1), gsngswdScale(1, 2), _
lblScale(0), lblScale(1), lblScale(2), lblScale(3), lblScale(4), lblScale(5), _
lblScale(6))
End Sub

Private Sub Form_Load()
Width = Screen.Width - dataviewfrm.Width - dataviewfrm.Left
Left = dataviewfrm.Width + dataviewfrm.Left
Top = baojingfrm.Top + baojingfrm.Height
Height = Screen.Height - baojingfrm.Top - baojingfrm.Height

Dim i As Integer
'**************************
'
'**************************
For i = 1 To 60
Load linScale(i)
With linScale(i)
    .X1 = Picture1.Left + (Picture1.Width / 60) * i
    .X2 = .X1
    .Y1 = Picture1.Top + Picture1.Height
    Select Case i
        Case 0, 10, 20, 30, 40, 50, 60
            .Y2 = .Y1 + 230
        Case 5, 15, 25, 35, 45, 55
            .Y2 = .Y1 + 150
        Case Else
            .Y2 = .Y1 + 100
    End Select
    .Visible = True
End With
Next
'****************************************************************
For i = 1 To 6
Load lblScale(i)
With lblScale(i)
    .Left = Picture1.Left - 200 + (Picture1.Width / 6) * i
    .Top = Picture1.Top + Picture1.Height + 220
    .Visible = True
End With
Next
For i = 1 To 20
Load linScaleV(i)
With linScaleV(i)
    .X2 = Picture1.Left
    .Y2 = Picture1.Top + (Picture1.Height / 20) * i
    .Y1 = .Y2
    Select Case i
        Case 10, 20
            .X1 = Picture1.Left - 250
        Case 5, 15
            .X1 = Picture1.Left - 150
        Case Else
            .X1 = Picture1.Left - 100
    End Select
    .Visible = True
End With
Next
'***************************
'读坐标上下限
'***************************
gsngwdScale(1, 1) = gsngfyfwdScaleTop(1)
gsngwdScale(1, 2) = gsngfyfwdScaleBottom(1)
gsngswdScale(1, 1) = gsnglqyswdScaleTop
gsngswdScale(1, 2) = gsnglqyswdScaleBottom
gsngkdScale(1, 1) = gsngtlfkdScaleTop(1)
gsngkdScale(1, 2) = gsngtlfkdScaleBottom(1)
gsngywScale(1, 1) = gsngjlgywScaleTop(1)
gsngywScale(1, 2) = gsngjlgywScaleBottom(1)
gsngllScale(1, 1) = gsngyjallScaleTop(1)
gsngllScale(1, 2) = gsngyjallScaleBottom(1)
optData.Value = True
With DBGrid1
    .Height = 2760
    .Visible = True
End With
End Sub
Private Sub optChart_Click()
DBGrid1.Visible = False
Picture1.Visible = True
End Sub

Private Sub optData_Click()
DBGrid1.Visible = True
Picture1.Visible = False
End Sub

Private Sub Text1_GotFocus()
Call GotFocusAgain(Text1)
End Sub

Private Sub Text2_GotFocus()
Call GotFocusAgain(Text2)
End Sub

Private Sub Text3_GotFocus()
Call GotFocusAgain(Text3)
End Sub

Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
On Error GoTo s
If KeyCode = vbKeyReturn Then
Dim msg As Variant
msg = Val(Text1.Text) & "-" & Val(Text2.Text) & "-" & Val(Text3.Text)
mfDate = CDate(msg)
    If mfDate Then
        cmdFirst.Enabled = True
        cmdLast.Enabled = True
        cmdPrevious.Enabled = True
        cmdNext.Enabled = True
        Data2.Enabled = True
    End If
DoEvents
With Data2
    .RecordSource = mstrSqlBatch & "#" & 20 & mfDate & "#"
    .Refresh
    .Recordset.MoveLast
    Label6.Caption = .Recordset.RecordCount
    .Recordset.MoveFirst
End With
End If
Exit Sub
s: Call Inform(131)
End Sub

⌨️ 快捷键说明

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