home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD5456532000.psc / Image Processing / mdiImgProcess.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-05-04  |  3.8 KB  |  131 lines

  1. VERSION 5.00
  2. Begin VB.MDIForm mdiImgProcess 
  3.    BackColor       =   &H8000000C&
  4.    Caption         =   "Image Processing by Albert Nicholas"
  5.    ClientHeight    =   6270
  6.    ClientLeft      =   60
  7.    ClientTop       =   630
  8.    ClientWidth     =   8310
  9.    LinkTopic       =   "MDIForm1"
  10.    StartUpPosition =   2  'CenterScreen
  11.    WindowState     =   2  'Maximized
  12.    Begin VB.Menu mnuFile 
  13.       Caption         =   "&File"
  14.       Begin VB.Menu mnuFileOpen 
  15.          Caption         =   "&Open Picture..."
  16.          Shortcut        =   ^O
  17.       End
  18.       Begin VB.Menu mnuSep01 
  19.          Caption         =   "-"
  20.       End
  21.       Begin VB.Menu mnuFileExit 
  22.          Caption         =   "E&xit"
  23.          Shortcut        =   ^X
  24.       End
  25.    End
  26.    Begin VB.Menu mnuFilter 
  27.       Caption         =   "F&ilters"
  28.       Begin VB.Menu mnuFilterLight 
  29.          Caption         =   "Lighten"
  30.       End
  31.       Begin VB.Menu mnuFilterDark 
  32.          Caption         =   "Darken"
  33.       End
  34.       Begin VB.Menu mnuFilterGS 
  35.          Caption         =   "Grayscale"
  36.       End
  37.       Begin VB.Menu mnuFilterInvert 
  38.          Caption         =   "Invert Color"
  39.       End
  40.       Begin VB.Menu mnuFilterBlur 
  41.          Caption         =   "Blur"
  42.       End
  43.    End
  44.    Begin VB.Menu mnuWin 
  45.       Caption         =   "&Window"
  46.       Begin VB.Menu mnuWinCas 
  47.          Caption         =   "Cascade"
  48.       End
  49.       Begin VB.Menu mnuWinHor 
  50.          Caption         =   "Tile Horizontally"
  51.       End
  52.       Begin VB.Menu mnuWinVer 
  53.          Caption         =   "Tile Vertically"
  54.       End
  55.       Begin VB.Menu mnuWinArr 
  56.          Caption         =   "Arrange Icons"
  57.       End
  58.    End
  59. Attribute VB_Name = "mdiImgProcess"
  60. Attribute VB_GlobalNameSpace = False
  61. Attribute VB_Creatable = False
  62. Attribute VB_PredeclaredId = True
  63. Attribute VB_Exposed = False
  64. ' ===================================
  65. ' Image Processing
  66. ' Author : Albert Nicholas
  67. ' Email  : nicho_tedja@yahoo.com
  68. ' ===================================
  69. ' The last project version takes a very long time to process an image
  70. ' Now, by using Windows API, this project enables you to process an image
  71. ' in a much shorter time.
  72. ' I apologize for those who have waited long for this projects
  73. ' You can use any concepts of this project, but PLEASE do not make a new project
  74. ' using these codes. Thank You
  75. ' Enclosed:
  76. ' Sample01.jpg
  77. ' Sample02.jpg
  78. ' just for sample pictures, in case you do not own any :)
  79. Private Sub MDIForm_Load()
  80.     indeks = 0
  81.     currDir = "C:\My Documents"
  82. End Sub
  83. Private Sub mnuFileExit_Click()
  84.     Dim i As Integer
  85.     For i = 0 To indeks
  86.         DeleteObject hBMPSour(i)
  87.         DeleteDC hDCSour(i)
  88.         DeleteObject hBMPDest(i)
  89.         DeleteDC hDCDest(i)
  90.             'THESE ARE IMPORTANT THINGS TO DO
  91.             'Destroy all spaces and bitmaps to clean up memory
  92.     Next i
  93.     End
  94. End Sub
  95. Private Sub mnuFileOpen_Click()
  96.     Load frmDlgOpen
  97.     frmDlgOpen.Show 1
  98.     If iCancel = True Then Exit Sub
  99.     picforms(indeks).Show
  100.     picforms(indeks).Caption = fpath
  101.     picforms(indeks).Tag = indeks
  102.     indeks = indeks + 1
  103. End Sub
  104. Private Sub mnuFilterBlur_Click()
  105.     Call Blurring(ActiveForm.Tag)
  106. End Sub
  107. Private Sub mnuFilterDark_Click()
  108.     Call Darken(ActiveForm.Tag)
  109. End Sub
  110. Private Sub mnuFilterGS_Click()
  111.     Call Grayscaling(ActiveForm.Tag)
  112. End Sub
  113. Private Sub mnuFilterInvert_Click()
  114.     Call Inverting(ActiveForm.Tag)
  115. End Sub
  116. Private Sub mnuFilterLight_Click()
  117.     Call Lighten(ActiveForm.Tag)
  118. End Sub
  119. Private Sub mnuWinArr_Click()
  120.     Me.Arrange vbArrangeIcons
  121. End Sub
  122. Private Sub mnuWinCas_Click()
  123.     Me.Arrange vbCascade
  124. End Sub
  125. Private Sub mnuWinHor_Click()
  126.     Me.Arrange vbTileHorizontal
  127. End Sub
  128. Private Sub mnuWinVer_Click()
  129.     Me.Arrange vbTileVertical
  130. End Sub
  131.