⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 这里有很多很实用的VB编程案例,方便大家学习VB.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "图片框控件"
   ClientHeight    =   3750
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3750
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "显示文字"
      Height          =   375
      Left            =   2040
      TabIndex        =   4
      Top             =   3360
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "显示图片"
      Height          =   375
      Left            =   480
      TabIndex        =   3
      Top             =   3360
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   480
      TabIndex        =   1
      Text            =   "Text1"
      Top             =   2880
      Width           =   3615
   End
   Begin VB.PictureBox Picture1 
      Height          =   2175
      Left            =   480
      ScaleHeight     =   2115
      ScaleWidth      =   3555
      TabIndex        =   0
      Top             =   240
      Width           =   3615
   End
   Begin VB.Label Label1 
      Caption         =   "图片路径"
      Height          =   375
      Left            =   480
      TabIndex        =   2
      Top             =   2520
      Width           =   2295
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    i = Dir(Text1.Text)
    If i <> "" Then
        Picture1.Picture = LoadPicture(Text1.Text)
    Else
        MsgBox "对不起,没有该图片"
    End If
End Sub

Private Sub Command2_Click()
    Picture1.CurrentX = 400
    Picture1.CurrentY = 400
    Picture1.FontSize = 16
    Picture1.Print "照猫画虎"
End Sub

Private Sub Form_Load()
    Text1.Text = App.Path + "\zmhh.jpg"
End Sub

⌨️ 快捷键说明

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