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

📄 frmocxdemo.frm

📁 这是书上的代码
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{17A90564-A273-11D6-A0F2-0080C8EBBC7D}#1.0#0"; "IMAGEP~1.OCX"
Begin VB.Form frmOCXDemo 
   Caption         =   "OCXDemo1.0"
   ClientHeight    =   4725
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7155
   Icon            =   "frmOCXDemo.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   4725
   ScaleWidth      =   7155
   StartUpPosition =   2  'CenterScreen
   Begin IMAGEPROCESSLib.ImageProcess ImageProcess1 
      Height          =   3735
      Left            =   240
      TabIndex        =   5
      Top             =   240
      Width           =   6615
      _Version        =   65536
      _ExtentX        =   11668
      _ExtentY        =   6588
      _StockProps     =   129
      BackColor       =   -2147483636
      Appearance      =   1
   End
   Begin VB.CommandButton cmdClear 
      Caption         =   "C&lear"
      Height          =   375
      Left            =   6000
      TabIndex        =   4
      Top             =   4200
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&SaveGrayBMP"
      Height          =   375
      Left            =   4200
      TabIndex        =   3
      Top             =   4200
      Width           =   1335
   End
   Begin VB.CommandButton cmdFilterMean 
      Caption         =   "&FiterMean"
      Height          =   375
      Left            =   2880
      TabIndex        =   2
      Top             =   4200
      Width           =   975
   End
   Begin VB.CommandButton cmdConvter 
      Caption         =   "&Convter"
      Height          =   375
      Left            =   1560
      TabIndex        =   1
      Top             =   4200
      Width           =   975
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   6720
      Top             =   120
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton cmdLoadFile 
      Caption         =   "&LoadFile"
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   4200
      Width           =   975
   End
End
Attribute VB_Name = "frmOCXDemo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdClear_Click()
    
    ImageProcess1.Clear

End Sub

Private Sub cmdConvter_Click()
    
    ImageProcess1.ConvterToGrayBMP
        
End Sub

Private Sub cmdFilterMean_Click()

    ImageProcess1.FilterMean

End Sub

Private Sub cmdLoadFile_Click()
    
    CommonDialog1.InitDir = App.Path
    CommonDialog1.ShowOpen
    
    If CommonDialog1.FileName <> "" Then
        
        ImageProcess1.ReadBMPFile (CommonDialog1.FileName)
        
    Else
    End If
    
End Sub


Private Sub Command1_Click()
    ImageProcess1.SaveGrayBMPFile App.Path & "/GrayBMP.bmp"
End Sub

⌨️ 快捷键说明

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