📄 从上到下的出图效果.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 345
ClientWidth = 4440
LinkTopic = "Form1"
ScaleHeight = 206
ScaleMode = 3 'Pixel
ScaleWidth = 296
StartUpPosition = 3 '窗口缺省
Begin VB.PictureBox Picture2
BorderStyle = 0 'None
Height = 4500
Left = 0
ScaleHeight = 4500
ScaleWidth = 4485
TabIndex = 1
Top = 0
Width = 4485
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 10
Left = 720
Top = 3210
End
End
Begin VB.PictureBox Picture1
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 4500
Left = 0
Picture = "从上到下的出图效果.frx":0000
ScaleHeight = 300
ScaleMode = 3 'Pixel
ScaleWidth = 299
TabIndex = 0
Top = 0
Visible = 0 'False
Width = 4485
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Sub Form_Paint()
Dim P1 As Single, P2 As Single, P3 As Single
Dim I As Integer, J As Single, T As Integer
Picture2.Cls
T = 3
P2 = T
P1 = Picture1.Width
For I = 0 To Picture1.Height Step T
P3 = I
BitBlt Form1.Picture2.hDC, 0, P3, P1, P2, Form1.Picture1.hDC, 0, P3, &HCC0020
' 延时20 ms
Sleep 20
Next I
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -