?? graphmdl.bas
字號:
Attribute VB_Name = "GaphIt"
'****************************************************************************
'人人為我,我為人人
'枕善居漢化收藏整理
'發布日期:2007/03/15
'描 述:SINE256加密可視化以及控制示例
'網 站:http://www.Mndsoft.com/ (VB6源碼博客)
'網 站:http://www.VbDnet.com/ (VB.NET源碼博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代碼別忘記給枕善居哦!
'****************************************************************************
Option Explicit
Public Declare Function GetTickCount Lib "kernel32" () As Long 'Just for stats
Private Const PI As Double = 3.14159265
Public Const BIGNUMBER_32 As Double = (2 ^ 32)
'THERES NOTHING REALLY IMPORTANT HERE
'JUST TO VISUALISE THE ALGORITHM
Public Function ChartIt(Chart As MSChart, ArrayX() As Byte)
Dim i As Long
Dim a As Long
a = UBound(ArrayX)
Dim k() As Long
ReDim k(0 To a)
For i = 0 To UBound(ArrayX)
k(i) = ArrayX(i) 'Convert bytes to long
Next
Chart.ChartData = k 'Draw datas
For i = 0 To UBound(ArrayX) 'Change graph color
Chart.Plot.SeriesCollection(i + 1).DataPoints(-1).Brush.FillColor.Red = 0
Chart.Plot.SeriesCollection(i + 1).DataPoints(-1).Brush.FillColor.Blue = 150
Chart.Plot.SeriesCollection(i + 1).DataPoints(-1).Brush.FillColor.Green = 70
Next
End Function
Public Function ChartIt2(Chart As MSChart, y() As Double)
Dim k As Long
Dim R(1 To 5000) As Double
Dim Buff As Double
For k = 1 To 5000
Buff = Round(((UBound(y)) / 5000) * k)
If Buff = 0 Then Buff = 1
R(k) = y(Buff)
Next
Chart.ChartData = R()
For k = 1 To 5000
Chart.Plot.SeriesCollection(k).DataPoints(-1).Brush.FillColor.Red = 0
Chart.Plot.SeriesCollection(k).DataPoints(-1).Brush.FillColor.Blue = 150
Chart.Plot.SeriesCollection(k).DataPoints(-1).Brush.FillColor.Green = 70
Next
End Function
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -