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

📄 chatform1.frm

📁 供销信息查询系统
💻 FRM
字号:
VERSION 5.00
Object = "{65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCHRT20.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form chatform1 
   Caption         =   "厂家年总产值图表"
   ClientHeight    =   4725
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8925
   ControlBox      =   0   'False
   Icon            =   "chatform1.frx":0000
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   4725
   ScaleWidth      =   8925
   WindowState     =   2  'Maximized
   Begin VB.Frame Frame1 
      Height          =   4575
      Left            =   90
      TabIndex        =   0
      Top             =   20
      Width           =   8755
      Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHFlexGrid1 
         Height          =   615
         Left            =   120
         TabIndex        =   2
         Top             =   3840
         Width           =   8535
         _ExtentX        =   15055
         _ExtentY        =   1085
         _Version        =   393216
         _NumberOfBands  =   1
         _Band(0).Cols   =   2
      End
      Begin MSChart20Lib.MSChart MSChart1 
         Height          =   3495
         Left            =   120
         OleObjectBlob   =   "chatform1.frx":08CA
         TabIndex        =   1
         Top             =   240
         Width           =   8505
      End
   End
End
Attribute VB_Name = "chatform1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private chartgrid As MSChart20Lib.DataGrid
Private axisy As MSChart20Lib.Label
Private rs As New ADODB.Recordset
Private strsql As String
Private strconn As String
Private inti As Integer
Private strformat As String

Private Sub Form_Load()
On Error Resume Next
chatform11 = 1
mainmdiform.Toolbar1.Buttons(6).Enabled = False
mainmdiform.Toolbar1.Buttons(7).Enabled = False
mainmdiform.Toolbar1.Buttons(8).Enabled = False
mainmdiform.Toolbar1.Buttons(10).Enabled = False
mainmdiform.Toolbar1.Buttons(11).Enabled = False
mainmdiform.StatusBar1.SimpleText = "正在查阅... ...厂家年总产值图表"
strsql = "select 年总产值,厂家名称 from 厂家"
strconn = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\供销信息.mdb"
strformat = "$###,###"
With rs
  If .State = adStateOpen Then
     .Close
  End If
  .ActiveConnection = strconn
  .Source = strsql
  .LockType = adLockReadOnly
  .CursorLocation = adUseClient
  .CursorType = adOpenDynamic
  .Open
End With
With MSChart1
  .chartType = VtChChartType2dBar
  .ShowLegend = False
  For inti = 1 To .Plot.Axis(VtChAxisIdY).Labels.Count
    Set axisy = .Plot.Axis(VtChAxisIdY).Labels(inti)
    axisy.Format = strformat
  Next inti
End With
Set chartgrid = MSChart1.DataGrid
With chartgrid
  .SetSize RowLabelCount:=1, ColumnLabelCount:=0, datarowcount:=7, datacolumncount:=1
  inti = 1
  rs.MoveFirst
  Do Until rs.EOF
  .SetData Row:=inti, Column:=1, DataPoint:=rs!年总产值, nullflag:=False
  .RowLabel(inti, 1) = Left(rs!厂家名称, 4)
  rs.MoveNext
  inti = inti + 1
  Loop
End With
With MSHFlexGrid1
  .Cols = 8
  .Row = 0
  .Col = 1
  .Text = "惠普公司"
  .Col = 2
  .Text = "天达公司"
  .Col = 3
  .Text = "熊猫电视机厂"
  .Col = 4
  .Text = "通达电缆厂"
  .Col = 5
  .Text = "春兰空调厂"
  .Col = 6
  .Text = "海尔电器厂"
  .Col = 7
  .Text = "长虹电器厂"
  .Row = 1
  rs.MoveFirst
  For inti = 1 To 7
  .Col = inti
  .Text = rs(0)
  rs.MoveNext
  Next inti
End With
End Sub

Private Sub Form_Resize()
If chatform1.WindowState = 0 Then
   chatform1.WindowState = 2
End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
mainmdiform.Toolbar1.Buttons(6).Enabled = True
mainmdiform.Toolbar1.Buttons(7).Enabled = True
mainmdiform.Toolbar1.Buttons(8).Enabled = True
mainmdiform.Toolbar1.Buttons(10).Enabled = True
mainmdiform.Toolbar1.Buttons(11).Enabled = True
End Sub

⌨️ 快捷键说明

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