📄 填满背景的图片.frm
字号:
VERSION 5.00
Begin VB.Form form1
Caption = "窗体背景图案"
ClientHeight = 2445
ClientLeft = 60
ClientTop = 345
ClientWidth = 4050
LinkTopic = "Form1"
ScaleHeight = 163
ScaleMode = 3 'Pixel
ScaleWidth = 270
StartUpPosition = 3 '窗口缺省
Begin VB.PictureBox Picture1
AutoRedraw = -1 'True
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 810
Left = 0
Picture = "填满背景的图片.frx":0000
ScaleHeight = 54
ScaleMode = 3 'Pixel
ScaleWidth = 54
TabIndex = 0
Top = 0
Visible = 0 'False
Width = 810
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 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 I As Integer, J As Integer
For J = 0 To Me.Height Step Picture1.ScaleHeight
For I = 0 To Me.Width Step Picture1.ScaleWidth
'使用BitBlt函数在窗体上复制位图
BitBlt Me.hDC, J, I, Picture1.ScaleWidth, Picture1.ScaleHeight, Picture1.hDC, 0, 0, &HCC0020
Next I
Next J
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -