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

📄 huitu2.frm

📁 客户管理系统 基于vb开发环境
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form huitu2 
   Caption         =   "Form1"
   ClientHeight    =   5820
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   10680
   LinkTopic       =   "Form1"
   ScaleHeight     =   5820
   ScaleWidth      =   10680
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command4 
      Caption         =   "退出"
      Height          =   375
      Left            =   9720
      TabIndex        =   8
      Top             =   3360
      Width           =   855
   End
   Begin VB.Frame Frame2 
      Caption         =   "画图选项"
      Height          =   1455
      Left            =   7800
      TabIndex        =   4
      Top             =   3840
      Visible         =   0   'False
      Width           =   2535
      Begin VB.OptionButton Option1 
         Caption         =   "预付金额"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   600
         TabIndex        =   7
         Top             =   240
         Width           =   1695
      End
      Begin VB.OptionButton Option2 
         Caption         =   "实际金额"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   600
         TabIndex        =   6
         Top             =   600
         Width           =   1575
      End
      Begin VB.OptionButton Option3 
         Caption         =   "尚欠金额"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   600
         TabIndex        =   5
         Top             =   960
         Width           =   1575
      End
   End
   Begin VB.CommandButton Command3 
      Caption         =   "饼图"
      Enabled         =   0   'False
      Height          =   375
      Left            =   8880
      TabIndex        =   2
      Top             =   3360
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "直方图"
      Enabled         =   0   'False
      Height          =   375
      Left            =   8040
      TabIndex        =   1
      Top             =   3360
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "绘图"
      Height          =   375
      Left            =   7200
      TabIndex        =   0
      Top             =   3360
      Width           =   855
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   7200
      Top             =   2880
      Width           =   3375
      _ExtentX        =   5953
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from kh"
      Caption         =   ""
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "huitu2.frx":0000
      Height          =   2655
      Left            =   7200
      TabIndex        =   3
      Top             =   240
      Width           =   3375
      _ExtentX        =   5953
      _ExtentY        =   4683
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   4
      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
      BeginProperty Column02 
         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 Column03 
         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 
            ColumnWidth     =   1739.906
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   1739.906
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1739.906
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   1739.906
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "huitu2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a$(), b(), c(), d(), n, max
Public Sub zbx()
Cls
n = 0: max = 0
Adodc1.Refresh
For i = 0 To Adodc1.Recordset.RecordCount - 1
n = n + 1
  ReDim Preserve a(n)
  ReDim Preserve b(n)
  ReDim Preserve c(n)
  ReDim Preserve d(n)

  
  a(i) = Adodc1.Recordset.Fields("客户全称")
  
  b(i) = Adodc1.Recordset.Fields("预付金额")
  c(i) = Adodc1.Recordset.Fields("实际金额")
  d(i) = Adodc1.Recordset.Fields("尚余欠款")
  Adodc1.Recordset.MoveNext

Next i
If Option1.Value = True Then
For i = 0 To Adodc1.Recordset.RecordCount - 1
  If b(i) > max Then max = b(i)
  Scale (-3, max * 1.2)-(max * 1.2, -max * 0.1)
  Line (0, 0)-(max * 1.2, 0): Line (0, max * 1.2)-(0, 0)
  Next i
   CurrentX = -3: CurrentY = -1
  Print "预付金额:";
  For j = 0 To UBound(a)
  Print a(j); b(j); ",";
  Next j
 ElseIf Option2.Value = True Then
 For i = 0 To Adodc1.Recordset.RecordCount - 1
If c(i) > max Then max = c(i)
Scale (-3, max * 1.2)-(max * 1.2, -max * 0.1)
Line (0, 0)-(max * 1.2, 0): Line (0, max * 1.2)-(0, 0)
Next i
CurrentX = -3: CurrentY = -1
Print "实际金额:";
For j = 0 To UBound(a)
Print a(j); c(j); ",";
Next j
ElseIf Option3.Value = True Then
Adodc1.Refresh
 For i = 0 To Adodc1.Recordset.RecordCount - 1
If d(i) > max Then max = d(i)
Scale (-3, max * 1.2)-(max * 1.2, -max * 0.1)
Line (0, 0)-(max * 1.2, 0): Line (0, max * 1.2)-(0, 0)
Next i
CurrentX = -3: CurrentY = -1
Print "尚欠余额:";
For j = 0 To UBound(a)
Print a(j); d(j); ",";
Next j
End If
End Sub
Private Sub Command1_Click()
Command2.Enabled = True
Command3.Enabled = True
Frame2.Visible = True
Option1.Value = True
End Sub

Private Sub Command2_Click()
zbx
w = max / 4 / n
X1 = w
For i = 0 To n - 1
   X2 = X1 + w
If Option1.Value = True Then
   Y2 = b(i)
ElseIf Option2.Value = True Then
 Y2 = c(i)
 Else: Y2 = d(i)
End If
Line (X1, 0)-(X2, Y2), QBColor(9), BF
CurrentX = X1
CurrentY = Y2 + max * 0.1
Print a(i)
X1 = X2 + w
Next i
End Sub

Private Sub Command3_Click()
zbx
y = Abs(ScaleHeight / 2) - 10
x = Abs(ScaleWidth / 4) - 10
r = max / 4
Sum = 0
For i = 0 To n - 1
If Option1 = True Then
 Sum = Sum + b(i)
ElseIf Option2 = True Then
Sum = Sum + c(i)
Else
Sum = Sum + d(i)
End If
Next i
FillStyle = 0
a1 = 0
For i = 0 To n - 1
 If Option1.Value = True Then
  a2 = a1 + 2 * 3.14159206 * b(i) / Sum
ElseIf Option2.Value = True Then
  a2 = a1 + 2 * 3.1415926 * c(i) / Sum
Else: a2 = a1 + 2 * 3.1415926 * d(i) / Sum
End If
  Randomize
  FillColor = QBColor(Rnd * 15)
  Circle (x, y), r, , -a1, -a2
  CurrentX = x + r * Cos((a2 + a1) / 2)
  CurrentY = y + r * Sin((a2 + a1) / 2)
  If Option1.Value = True Then
  Print Format(b(i) / Sum * 100, "0.00"); "%"
  ElseIf Option2.Value = True Then
  Print Format(c(i) / Sum * 100, "0.00"); "%"
  Else: Print Format(d(i) / Sum * 100, "0.00"); "%"
  End If
  a1 = a2
  Next i
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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