module3.bas
来自「adsl拨号工具 有很多功能 不错啊 大家试试」· BAS 代码 · 共 68 行
BAS
68 行
Attribute VB_Name = "Module2"
Option Explicit
'==========================================================================================================='
' Variable declarations '
'==========================================================================================================='
Public intStoreX As Integer
Public intStoreY As Integer
Public lRet As Long
Public NewX As Long
Public NewY As Long
Public tmpStep As Integer
Public intProcX As Integer
Public intProcY As Integer
Public nProcX As Integer
Public nProcY As Integer
Dim iLoadCPU As Integer
Dim iLoadMemory As Integer
'-----------------------------------------------------------------------------------------------------------'
' Defines Memory graph styles '
'-----------------------------------------------------------------------------------------------------------'
Public strColourCPU As Long
Public strColourMemory As Long
Public strNotAlwaysOnTop As Integer
Public Counter As Integer
Sub StepUpProgress(X1 As Integer, Y1 As Integer, Percentage As Integer, Colour As Long, PM As String)
'==========================================================================================================='
' Add a line segment to the Memory load graph '
'==========================================================================================================='
'tmpStep = FmObj.sldStep.Value + 1
tmpStep = tmpStep + 1
NewX = X1 + tmpStep
NewY = frmDialupManage.picGraph.ScaleHeight - ((Percentage / 100) * frmDialupManage.picGraph.ScaleHeight)
'-----------------------------------------------------------------------------------------------------------'
' When we've reached the right hand side of the picturebox, we widen it and move it left, so the graph '
' stays on-screen. This will, rather ironically, use physical memory, as well as some of the page file each '
' step onwards, but it's the only practical solution I could come up with. If you can come up with a better '
' way, feel free to e-mail me. '
'-----------------------------------------------------------------------------------------------------------'
If (NewX) > (frmDialupManage.picGraph.ScaleWidth - 5) Then
frmDialupManage.picGraph.Width = frmDialupManage.picGraph.Width + tmpStep
frmDialupManage.picGraph.Left = frmDialupManage.picGraph.Left - tmpStep
End If
'-----------------------------------------------------------------------------------------------------------'
' Draw the segment '
'-----------------------------------------------------------------------------------------------------------'
frmDialupManage.picGraph.Line (NewX, NewY)-(X1, Y1), Colour
'-----------------------------------------------------------------------------------------------------------'
' Set up the next cycle's source point '
'-----------------------------------------------------------------------------------------------------------'
If PM = "M" Then
intStoreX = NewX
intStoreY = NewY
Else
intProcX = NewX
intProcY = NewY
End If
DoEvents
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?