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

📄 form1.frm

📁 description de graphique avec VB6
💻 FRM
字号:
VERSION 5.00
Object = "{65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCHRT20.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   8640
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   10560
   LinkTopic       =   "Form1"
   ScaleHeight     =   8640
   ScaleWidth      =   10560
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   735
      Left            =   2040
      TabIndex        =   2
      Top             =   7320
      Width           =   1935
   End
   Begin MSChart20Lib.MSChart MSChart1 
      Height          =   3495
      Left            =   1920
      OleObjectBlob   =   "Form1.frx":0000
      TabIndex        =   1
      Top             =   2760
      Width           =   6375
   End
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
      Bindings        =   "Form1.frx":2356
      Height          =   2055
      Left            =   480
      TabIndex        =   0
      Top             =   240
      Width           =   6015
      _ExtentX        =   10610
      _ExtentY        =   3625
      _Version        =   393216
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access 2000;"
      DatabaseName    =   ""
      DefaultCursorType=   0  'DefaultCursor
      DefaultType     =   2  'UseODBC
      Exclusive       =   0   'False
      Height          =   615
      Left            =   6840
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   360
      Width           =   2055
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim dbs As Database
Dim rst As Recordset
Dim chemin As String


Private Sub Command1_Click()
rst.MoveFirst
MSChart1.AllowSelections = False    ' Interdit la s閘ection dans le graphe
With MSChart1
    .chartType = VtChChartType2dBar    ' type de graphe
    .ColumnCount = 1                   ' nombre de barre
    .RowCount = 12                     ' nombre de mois
    ' lecture du nom des mois et des temp閞atures dans la BD
    For i = 1 To 12
        .Row = i
        .Column = 1
        .RowLabel = rst(1)       ' le nom de chaque mois
        .Data = rst(2)     ' la valeur de temp閞ature maximale
        rst.MoveNext                    ' le mois suivant
    Next i
End With

'' Pour que le curseur soit diff閞ent lorsque la souris passe sur le graphe
'MSChart1.DoSetCursor = True
'MSChart1.MousePointer = VtMousePointerArrowQuestion
End Sub

Private Sub Form_Load()
chemin = App.Path & "\base2000.mdb"


Set dbs = DBEngine.OpenDatabase(chemin)
Set rst = dbs.OpenRecordset("total", dbOpenDynaset)

Data1.DatabaseName = chemin
Data1.RecordSource = "total"

'rst.MoveFirst
'While Not rst.EOF
'Combo1.AddItem rst(0)
'rst.MoveNext
'Wend
End Sub

⌨️ 快捷键说明

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