home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / MenuBitmap204623242007.psc / frmCrop.frm < prev    next >
Text File  |  2007-02-04  |  3KB  |  120 lines

  1. VERSION 5.00
  2. Begin VB.Form frmCrop 
  3.    Caption         =   "Click to Select"
  4.    ClientHeight    =   4965
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5955
  8.    Icon            =   "frmCrop.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   4965
  11.    ScaleWidth      =   5955
  12.    StartUpPosition =   1  'CenterOwner
  13.    Begin VB.Frame Frame1 
  14.       Height          =   1095
  15.       Left            =   2640
  16.       TabIndex        =   1
  17.       Top             =   240
  18.       Width           =   2415
  19.       Begin VB.CommandButton cmdReset 
  20.          Caption         =   "ReSelect"
  21.          Enabled         =   0   'False
  22.          Height          =   255
  23.          Left            =   120
  24.          TabIndex        =   5
  25.          Top             =   480
  26.          Width           =   1575
  27.       End
  28.       Begin VB.CommandButton cmdOK 
  29.          Caption         =   "Use this Selection"
  30.          Enabled         =   0   'False
  31.          Height          =   255
  32.          Left            =   120
  33.          TabIndex        =   4
  34.          Top             =   240
  35.          Width           =   1575
  36.       End
  37.       Begin VB.CommandButton cmdCanx 
  38.          Caption         =   "Cancel"
  39.          Height          =   255
  40.          Left            =   120
  41.          TabIndex        =   3
  42.          Top             =   720
  43.          Width           =   1575
  44.       End
  45.       Begin VB.PictureBox picCrop 
  46.          Appearance      =   0  'Flat
  47.          AutoRedraw      =   -1  'True
  48.          BackColor       =   &H80000005&
  49.          BorderStyle     =   0  'None
  50.          ForeColor       =   &H80000008&
  51.          Height          =   195
  52.          Left            =   1920
  53.          ScaleHeight     =   13
  54.          ScaleMode       =   3  'Pixel
  55.          ScaleWidth      =   13
  56.          TabIndex        =   2
  57.          Top             =   240
  58.          Width           =   195
  59.       End
  60.    End
  61.    Begin VB.PictureBox picSrc 
  62.       Appearance      =   0  'Flat
  63.       AutoRedraw      =   -1  'True
  64.       AutoSize        =   -1  'True
  65.       BackColor       =   &H80000005&
  66.       BorderStyle     =   0  'None
  67.       ForeColor       =   &H80000008&
  68.       Height          =   2355
  69.       Left            =   0
  70.       MouseIcon       =   "frmCrop.frx":014A
  71.       ScaleHeight     =   157
  72.       ScaleMode       =   3  'Pixel
  73.       ScaleWidth      =   157
  74.       TabIndex        =   0
  75.       Top             =   0
  76.       Width           =   2355
  77.    End
  78. End
  79. Attribute VB_Name = "frmCrop"
  80. Attribute VB_GlobalNameSpace = False
  81. Attribute VB_Creatable = False
  82. Attribute VB_PredeclaredId = True
  83. Attribute VB_Exposed = False
  84. Option Explicit
  85. Private GotIt As Boolean
  86.  
  87. Private Sub cmdCanx_Click()
  88.  Unload Me
  89. End Sub
  90.  
  91. Private Sub cmdOK_Click()
  92.  Set frmMain.picBMP.Picture = picCrop.Image
  93.  Unload Me
  94. End Sub
  95.  
  96. Private Sub cmdReset_Click()
  97.  GotIt = False
  98.  cmdOK.Enabled = False
  99.  cmdReset.Enabled = False
  100. End Sub
  101.  
  102. Private Sub Form_Resize()
  103.  Frame1.Move 0, ScaleHeight - Frame1.Height
  104. End Sub
  105.  
  106. Private Sub picSrc_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  107.  cmdOK.Enabled = True
  108.  If Not GotIt Then
  109.   Set picCrop.Picture = LoadPicture
  110.   BitBlt picCrop.hdc, 0, 0, 13, 13, _
  111.     picSrc.hdc, x - 0, y - 0, vbSrcCopy
  112.   picCrop.Refresh
  113.  End If
  114. End Sub
  115.  
  116. Private Sub picSrc_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
  117.  GotIt = True
  118.  cmdReset.Enabled = True
  119. End Sub
  120.