form1.frm

来自「一款漂亮的控件。 快」· FRM 代码 · 共 52 行

FRM
52
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "整个窗体铺满图片"
   ClientHeight    =   4305
   ClientLeft      =   1140
   ClientTop       =   1515
   ClientWidth     =   6510
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   4305
   ScaleWidth      =   6510
   Begin VB.PictureBox Picture1 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   600
      Left            =   240
      Picture         =   "Form1.frx":0000
      ScaleHeight     =   600
      ScaleWidth      =   600
      TabIndex        =   0
      Top             =   240
      Visible         =   0   'False
      Width           =   600
   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 Sub Form_Paint()
Dim wid As Single
Dim hgt As Single
Dim x As Single
Dim y As Single

    wid = Picture1.ScaleWidth
    hgt = Picture1.ScaleHeight
    y = 0
    Do While y < ScaleHeight
        x = 0
        Do While x < ScaleWidth
            PaintPicture Picture1.Picture, _
                x, y, wid, hgt
            x = x + wid
        Loop
        y = y + hgt
    Loop
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?