📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H80000007&
Caption = "图片铺满窗体"
ClientHeight = 3960
ClientLeft = 60
ClientTop = 345
ClientWidth = 4800
Icon = "Form1.frx":0000
LinkTopic = "Form1"
ScaleHeight = 3960
ScaleWidth = 4800
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command3
Caption = "退出"
Height = 405
Left = 3150
TabIndex = 3
Top = 3420
Width = 1365
End
Begin VB.CommandButton Command2
Caption = "还原"
Height = 405
Left = 1725
TabIndex = 2
Top = 3420
Width = 1365
End
Begin VB.CommandButton Command1
Caption = "平铺图片"
Height = 405
Left = 300
TabIndex = 1
Top = 3420
Width = 1365
End
Begin VB.PictureBox Picture1
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
Height = 2115
Left = 240
ScaleHeight = 2115
ScaleWidth = 2190
TabIndex = 0
Top = 270
Width = 2190
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
'载入图片
Picture1.Picture = LoadPicture(App.Path & "\back1.bmp")
End Sub
Private Sub Command1_Click()
Picture1.Visible = False
Form1.Refresh
For i = 0 To Int(Form1.Width / Picture1.Width)
For j = 0 To Int(Form1.Width / Picture1.Width)
Form1.PaintPicture Picture1.Picture, j * Picture1.Width, i * Picture1.Height, _
Picture1.Width, Picture1.Height
Next j, i
End Sub
Private Sub Command2_Click()
'清除窗体
Form1.Cls
Picture1.Visible = True
End Sub
Private Sub Command3_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -