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

📄 form1.frm

📁 vb电子书籍
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H80000000&
   Caption         =   "源图"
   ClientHeight    =   2175
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4545
   DrawMode        =   1  'Blackness
   FillColor       =   &H00FF0000&
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   12
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H00FF0000&
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   2175
   ScaleWidth      =   4545
   StartUpPosition =   2  '屏幕中心
   Begin VB.PictureBox Picture1 
      FillColor       =   &H00404040&
      FillStyle       =   3  'Vertical Line
      Height          =   1935
      Left            =   240
      Picture         =   "Form1.frx":000C
      ScaleHeight     =   1875
      ScaleWidth      =   4035
      TabIndex        =   0
      Top             =   120
      Width           =   4095
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Dim x1, y1, x2, y2 As Single

'CODE Manger By BcodeXRose
'##################################################################
'## 过程名称:Form_Load
'## 参数: 无
'##################################################################
Private Sub Form_Load()
    Form2.Show
End Sub
    
'##################################################################
'## 过程名称:Picture1_MouseDown
'## 参数:Button 为Integer型
'## 参数:Shift 为Integer型
'## 参数:X 为Single型
'## 参数:Y 为Single型
'##################################################################
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    x1 = X: y1 = Y: x2 = X: y2 = Y
    Button = 1
    Picture1.DrawMode = 7
    Picture1.DrawStyle = 4
End Sub
    
'##################################################################
'## 过程名称:Picture1_MouseMove
'## 参数:Button 为Integer型
'## 参数:Shift 为Integer型
'## 参数:X 为Single型
'## 参数:Y 为Single型
'##################################################################
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then
        Picture1.Line (x1, y1)-(x2, y2), , B
        x2 = X: y2 = Y
        Picture1.Line (x1, y1)-(x2, y2), QBColor(8), B
    End If
End Sub
    
'##################################################################
'## 过程名称:Picture1_MouseUp
'## 参数:Button 为Integer型
'## 参数:Shift 为Integer型
'## 参数:X 为Single型
'## 参数:Y 为Single型
'##################################################################
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error Resume Next
    Picture1.Line (x1, y1)-(x2, y2), , B
    Form2.Cls
    Form2.PaintPicture Picture1, x1, y1, x2 - x1, y2 - y1, x1, y1, x2 - x1, y2 - y1
End Sub

⌨️ 快捷键说明

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