皮皮网

【实时股票源码】【手机抄表 源码】【阿里云旺源码】CreateSolidBrush源码

时间:2024-11-26 22:37:43 来源:html列表模版源码

1.VB 在桌面屏幕上画一条直线如何让它重绘?

CreateSolidBrush源码

VB 在桌面屏幕上画一条直线如何让它重绘?

       '屏幕重绘 源码如下

       '画多线声波色条

       Public Sub DrawFrequencies(intSamples() As Integer,源码实时股票源码 picbox As PictureBox)

        'FFT_SAMPLES =

        Dim sngRealOut(FFT_SAMPLES - 1) As Single

        Dim sngBand As Single

        Dim hBrush As Long

        Dim i As Long

        Dim j As Long

        Dim intRed As Integer

        Dim intGreen As Integer

        Dim intBlue As Integer

        Dim rcBand As RECT

        If UBound(intSamples) < FFT_SAMPLES - 1 Then Exit Sub

        If clsFFT Is Nothing Then

        Set clsFFT = New clsFourier

        clsFFT.NumberOfSamples = FFT_SAMPLES

        clsFFT.WithTimeWindow = 1

        End If

        '读入数据

        For i = 0 To FFT_SAMPLES - 1 'FFT_SAMPLES =

        clsFFT.RealIn(i + 1) = intSamples(i) '动态数值传送

        Next

        ' lower band amplitudes

        For i = 0 To FFT_BANDS - 1 'band(i) = 0 FFT_BANDS =

        band(i) = band(i) - FFT_BANDLOWER 'FFT_BANDLOWER = 0.

        If band(i) < 0 Then band(i) = 0

        Next

        'band(0) = 0 : band(1) = 0 : band(2) = 0 : band(3) = 0 : band(4) = 0 : band(5) = 0 : band(6) = 0

        For i = 0 To FFT_SAMPLES / 2

        'FFT_SAMPLES =

        sngRealOut(i) = clsFFT.ComplexOut(i + 1) / (FFT_SAMPLES / 4) /

        If sngRealOut(i) > FFT_MAXAMPLITUDE Then

        sngRealOut(i) = FFT_MAXAMPLITUDE

        End If

        sngRealOut(i) = sngRealOut(i) / FFT_MAXAMPLITUDE 'FFT_MAXAMPLITUDE = 0.2

        Next

        j = FFT_STARTINDEX

        For i = 0 To FFT_BANDS - 1 'FFT_BANDS =

        For j = j To j + FFT_BANDWIDTH 'FFT_BANDWIDTH = 3

        sngBand = sngBand + sngRealOut(j)

        Next

        sngBand = (sngBand * (Hanning(i + 3, FFT_BANDS + 3) + 1)) / FFT_BANDWIDTH

       'MsgBox band(i) '--------------------------------

        If band(i) < sngBand Then band(i) = sngBand

        If band(i) > 1 Then band(i) = 1

        j = j + FFT_BANDSPACE

        Next

        ' draw bars

        picbox.Cls

        intRed =

        intBlue =

        '画整个色块 共块色条

        For i = 0 To FFT_BANDS - 1 'FFT_BANDS = picbox.ScaleHeight =

        intGreen = (band(i) * ) ' i ( 0-)

        hBrush = CreateSolidBrush(RGB(intRed, intGreen, intBlue))

        '画单个色块

        With rcBand

        .Right = i * (DRW_BARWIDTH + DRW_BARSPACE) + DRW_BARWIDTH + DRW_BARXOFF

        .Left = i * (DRW_BARWIDTH + DRW_BARSPACE) + DRW_BARXOFF

        '单个色块的高度 忽上忽下 DRW_BARYOFF=2 常数 band(i)自定精度数组(0-) 从小到大

        '.Top = max(DRW_BARYOFF, Min(picbox.ScaleHeight, picbox.ScaleHeight - (picbox.ScaleHeight * band(i))) - DRW_BARYOFF) ' - 1)

        .Top = max(2, Min(, - ( * band(i))) - 2)

        .Bottom = picbox.ScaleHeight - DRW_BARYOFF

        End With

        FillRect picbox.hdc, rcBand, hBrush '用指定刷子填充色块区域

        DeleteObject hBrush

        Next

       End Sub

推荐资讯
企帮帮源码_企帮帮官网

企帮帮源码_企帮帮官网

chrome v8 源码

chrome v8 源码

种子源码搜索网站_种子源码搜索网站下载

种子源码搜索网站_种子源码搜索网站下载

易语言防od源码_易语言防od调试

易语言防od源码_易语言防od调试

点击竞价源码_点击竞价源码怎么弄

点击竞价源码_点击竞价源码怎么弄

o2oapp源码

o2oapp源码

copyright © 2016 powered by 皮皮网   sitemap