?? menu.frm
字號:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "圖象處理"
ClientHeight = 3540
ClientLeft = 1536
ClientTop = 2232
ClientWidth = 6984
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 295
ScaleMode = 3 'Pixel
ScaleWidth = 582
Begin VB.PictureBox wdPicture
Height = 2772
Left = 3600
ScaleHeight = 227
ScaleMode = 3 'Pixel
ScaleWidth = 257
TabIndex = 11
Top = 480
Width = 3132
End
Begin VB.PictureBox WSPicture
AutoRedraw = -1 'True
Enabled = 0 'False
Height = 2772
Left = 240
ScaleHeight = 227
ScaleMode = 3 'Pixel
ScaleWidth = 257
TabIndex = 10
Top = 480
Width = 3132
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 4560
Top = 4560
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.PictureBox WIPicture2
AutoRedraw = -1 'True
AutoSize = -1 'True
Height = 375
Left = 2760
ScaleHeight = 27
ScaleMode = 3 'Pixel
ScaleWidth = 27
TabIndex = 9
Top = 720
Visible = 0 'False
Width = 375
End
Begin VB.PictureBox WIPicture1
AutoRedraw = -1 'True
AutoSize = -1 'True
Height = 375
Left = 2040
ScaleHeight = 27
ScaleMode = 3 'Pixel
ScaleWidth = 27
TabIndex = 8
Top = 720
Visible = 0 'False
Width = 375
End
Begin VB.Frame Frame2
Caption = "目的圖像"
Height = 2172
Left = 4920
TabIndex = 2
Top = 840
Visible = 0 'False
Width = 1572
Begin VB.HScrollBar WDHScrol
Enabled = 0 'False
Height = 270
Left = 240
TabIndex = 7
Top = 3600
Width = 3495
End
Begin VB.VScrollBar WDVScrol
Enabled = 0 'False
Height = 3255
Left = 3600
TabIndex = 6
Top = 120
Width = 255
End
Begin VB.PictureBox WDPicture1
Height = 3255
Left = -3240
ScaleHeight = 267
ScaleMode = 3 'Pixel
ScaleWidth = 287
TabIndex = 3
Top = 720
Width = 3495
End
End
Begin VB.Frame Frame1
Caption = "源圖像"
Height = 2052
Left = 1080
TabIndex = 0
Top = 1080
Visible = 0 'False
Width = 1452
Begin VB.HScrollBar WSHScrol
Enabled = 0 'False
Height = 270
Left = 240
TabIndex = 5
Top = 3600
Width = 3495
End
Begin VB.VScrollBar WSVScrol
Enabled = 0 'False
Height = 3255
Left = 3720
TabIndex = 4
Top = 360
Width = 270
End
Begin VB.PictureBox WSPicture1
AutoRedraw = -1 'True
Enabled = 0 'False
Height = 3255
Left = 240
ScaleHeight = 267
ScaleMode = 3 'Pixel
ScaleWidth = 287
TabIndex = 1
Top = 360
Width = 3495
End
End
Begin VB.Label Label2
Caption = "目標圖像"
BeginProperty Font
Name = "宋體"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 3600
TabIndex = 13
Top = 120
Width = 1572
End
Begin VB.Label Label1
Caption = "源圖像"
BeginProperty Font
Name = "宋體"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 600
TabIndex = 12
Top = 120
Width = 1572
End
Begin VB.Menu FileMenu
Caption = "文件(&F)"
NegotiatePosition= 3 'Right
Begin VB.Menu fileopen
Caption = "打開文件(&O)"
Shortcut = ^O
End
Begin VB.Menu FileClose
Caption = "關閉文件(&E)"
Enabled = 0 'False
Shortcut = ^E
End
Begin VB.Menu FileSep1
Caption = "-"
End
Begin VB.Menu FileSaveas
Caption = "文件另存為(&S)"
Shortcut = ^S
End
Begin VB.Menu FileSep2
Caption = "-"
End
Begin VB.Menu FilePrint
Caption = "打印(&P)"
Enabled = 0 'False
Shortcut = ^P
End
Begin VB.Menu FilePrintSetting
Caption = "打印設置(&U)"
Enabled = 0 'False
Shortcut = ^U
End
Begin VB.Menu FileSep3
Caption = "-"
End
Begin VB.Menu RunTimeFiles
Caption = "RunTimeFiles"
Index = 0
Visible = 0 'False
End
Begin VB.Menu FileSep4
Caption = "-"
Visible = 0 'False
End
Begin VB.Menu FileExit
Caption = "退出(&X)"
Shortcut = ^X
End
End
Begin VB.Menu HuiMenu
Caption = "灰度處理(&H)"
Visible = 0 'False
Begin VB.Menu HuiImage
Caption = "灰度圖象"
End
Begin VB.Menu ComProLight
Caption = "亮度處理"
End
Begin VB.Menu HuiSep1
Caption = "-"
End
Begin VB.Menu HuiRectChart
Caption = "灰度直方圖"
End
Begin VB.Menu HuiSep2
Caption = "-"
End
Begin VB.Menu HuiTwoImage
Caption = "二值圖象"
End
End
Begin VB.Menu ComProMenu
Caption = "普通處理"
Visible = 0 'False
Begin VB.Menu ComProSmooth
Caption = "柔化處理"
End
Begin VB.Menu ComProSharpen
Caption = "銳化處理"
End
Begin VB.Menu ComProEmboss
Caption = "浮雕處理"
End
Begin VB.Menu ComProDiffuse
Caption = "擴散處理"
End
Begin VB.Menu ComProSolarize
Caption = "曝光處理"
End
Begin VB.Menu ComSep1
Caption = "-"
End
Begin VB.Menu ComProCustomFilter
Caption = "定制過濾器"
End
End
Begin VB.Menu LineMenu
Caption = "線性卷積"
Visible = 0 'False
Begin VB.Menu LineLow
Caption = "低通濾波"
End
Begin VB.Menu LineHigh
Caption = "高通濾波"
End
Begin VB.Menu LineSep1
Caption = "-"
End
Begin VB.Menu LineKernel
Caption = "定制卷積核"
End
End
Begin VB.Menu FeMenu
Caption = "頻域處理(&F)"
Visible = 0 'False
Begin VB.Menu FeFft
Caption = "傅立葉變換"
End
Begin VB.Menu FeSep1
Caption = "-"
End
Begin VB.Menu FeHigh
Caption = "高通濾波"
Enabled = 0 'False
End
Begin VB.Menu FeLow
Caption = "低通濾波"
Enabled = 0 'False
End
Begin VB.Menu FeDai
Caption = "帶通濾波"
Enabled = 0 'False
End
Begin VB.Menu FeSep2
Caption = "-"
End
Begin VB.Menu FeIFft
Caption = "傅立葉反變換"
End
End
Begin VB.Menu IndusMenu
Caption = "工業圖象處理"
Begin VB.Menu IndusSign
Caption = "二值處理"
End
Begin VB.Menu IndusSep1
Caption = "-"
End
Begin VB.Menu IndusArea
Caption = "面積測量"
End
Begin VB.Menu IndusCircle
Caption = "周長測量"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public RuntimeNumber As Integer '動態文件數
Public SourceX, SourceY As Integer '源滾動條
Public DestX, DestY As Integer '目的滾動條
Public WNumber As Long '標號數目
Dim WSignArray() As Long '圖象標號的數組
Dim WCompareString(5) As String '作為動態顯示文件名的存儲數組
Dim area1 As Variant
Private Sub FileClose_Click() '文件關閉部分
' MsgBox "添加關閉文件和維護動態菜單"
RuntimeNumber = RuntimeNumber - 1
If (RuntimeNumber = 0) Then
RunTimeFiles(RuntimeNumber).Visible = False '動態顯示部分
FileSep4.Visible = False
FileClose.Enabled = False
WSHScrol.Enabled = False
WSVScrol.Enabled = False
WCompareString(RuntimeNumber) = "" '數組部分
Form1.Frame2.Caption = WDString '標題為“目的圖象”
WSPicture.Picture = LoadPicture() '圖象處理部分
WIPicture1.Picture = LoadPicture()
wdPicture.Picture = LoadPicture()
WSaveFileFlag = False '可以存盤的標志為假
Else
WSaveFileFlag = False '可以存盤的標志為假
Unload RunTimeFiles(RuntimeNumber)
WCompareString(RuntimeNumber) = ""
Form1.Frame2.Caption = WDString '標題為“目的圖象”
wdPicture.Picture = LoadPicture() '目的圖象為空
'顯示上一個圖象部分
SourceX = 0: SourceY = 0 '源滾動部分的初值
WSHScrol.Value = 0: WSVScrol.Value = 0
Call DisplayPicture1(WCompareString(RuntimeNumber - 1), WSPicture, WIPicture1, WIPicture2, WSHScrol, WSVScrol, Form1)
End If
End Sub
Private Sub FileExit_Click() '文件退出
MsgBox "exit"
End Sub
Private Sub FileOpen_Click() '打開文件部分
Dim WFilename As String '每次打開文件名
Dim WStringCompare
Static WFileoldname As String '保留打開文件名
Dim I As Integer
Dim Wcompare As Boolean
CommonDialog1.InitDir = App.Path
CommonDialog1.Filter = "Image(*.BMP;*.GIF;*.JPG;*.DIB)|*.BMP;*.GIF;*.JPG;*.DIB"
CommonDialog1.Action = 1
WFilename = CommonDialog1.FileName
If ((WFilename <> "") And (RuntimeNumber < 4)) Then '如果文件已打開則顯示且打開小于5
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -