home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / MorphPicVi2055863242007.psc / MorphPicViewer / Form1.frm < prev    next >
Text File  |  2007-03-24  |  13KB  |  366 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "MorphPicViewer - Matthew R. Usner"
  4.    ClientHeight    =   6270
  5.    ClientLeft      =   60
  6.    ClientTop       =   450
  7.    ClientWidth     =   4680
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   6270
  10.    ScaleWidth      =   4680
  11.    StartUpPosition =   2  'CenterScreen
  12.    Begin Project1.MorphContainer MorphContainer1 
  13.       Height          =   6135
  14.       Left            =   0
  15.       TabIndex        =   1
  16.       Top             =   0
  17.       Width           =   4695
  18.       _ExtentX        =   8281
  19.       _ExtentY        =   10821
  20.       BackAngle       =   65
  21.       IconSize        =   0
  22.       BackColor2      =   12632256
  23.       BackColor1      =   0
  24.       BeginProperty CaptionFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  25.          Name            =   "MS Sans Serif"
  26.          Size            =   8.25
  27.          Charset         =   0
  28.          Weight          =   400
  29.          Underline       =   0   'False
  30.          Italic          =   0   'False
  31.          Strikethrough   =   0   'False
  32.       EndProperty
  33.       BorderWidth     =   0
  34.       HeaderVisible   =   0   'False
  35.       Begin Project1.MorphContainer MorphContainer2 
  36.          Height          =   5775
  37.          Left            =   120
  38.          TabIndex        =   2
  39.          Top             =   120
  40.          Width           =   4455
  41.          _ExtentX        =   7858
  42.          _ExtentY        =   10186
  43.          BackAngle       =   45
  44.          IconSize        =   0
  45.          HeaderColor2    =   8421504
  46.          HeaderColor1    =   0
  47.          BackColor2      =   12632256
  48.          BackColor1      =   0
  49.          BorderColor     =   0
  50.          CaptionColor    =   65535
  51.          Caption         =   "Navigation Demo"
  52.          BeginProperty CaptionFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  53.             Name            =   "Tahoma"
  54.             Size            =   9.75
  55.             Charset         =   0
  56.             Weight          =   700
  57.             Underline       =   0   'False
  58.             Italic          =   0   'False
  59.             Strikethrough   =   0   'False
  60.          EndProperty
  61.          Begin Project1.MorphOptionCheck optPicStyle 
  62.             Height          =   375
  63.             Index           =   0
  64.             Left            =   360
  65.             TabIndex        =   5
  66.             Top             =   4560
  67.             Width           =   1455
  68.             _ExtentX        =   2566
  69.             _ExtentY        =   661
  70.             BackColor1      =   4210752
  71.             BackColor2      =   14737632
  72.             Caption         =   "Normal Size"
  73.             CheckBoxAngle   =   45
  74.             CheckBoxColor1  =   4210752
  75.             CheckBoxColor2  =   16777215
  76.             CheckBoxMiddleOut=   0   'False
  77.             CheckColor      =   0
  78.             ControlType     =   1
  79.             BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  80.                Name            =   "MS Sans Serif"
  81.                Size            =   8.25
  82.                Charset         =   0
  83.                Weight          =   400
  84.                Underline       =   0   'False
  85.                Italic          =   0   'False
  86.                Strikethrough   =   0   'False
  87.             EndProperty
  88.             MouseOverActions=   3
  89.             MOverBorderColor=   16776960
  90.             MOverCheckBoxColor=   16776960
  91.             ShowFocusRect   =   0   'False
  92.             Value           =   -1
  93.          End
  94.          Begin Project1.MorphPicViewer mpvNavigate 
  95.             Height          =   2655
  96.             Left            =   120
  97.             TabIndex        =   0
  98.             Top             =   720
  99.             Width           =   4215
  100.             _ExtentX        =   7435
  101.             _ExtentY        =   4683
  102.             BorderWidth     =   8
  103.             DisBorderBGColor1=   8421504
  104.             DisBorderBGColor2=   14737632
  105.             PicHeight       =   768
  106.             Picture         =   "Form1.frx":0000
  107.             PicWidth        =   1024
  108.          End
  109.          Begin Project1.MorphRangeRoamer mrrVertical 
  110.             Height          =   720
  111.             Left            =   600
  112.             TabIndex        =   3
  113.             Top             =   3480
  114.             Width           =   375
  115.             _ExtentX        =   661
  116.             _ExtentY        =   1270
  117.             UD_BorderWidth  =   4
  118.             UD_IncrementInterval=   75
  119.             UD_ScrollDelay  =   100
  120.             UD_SwapDirections=   -1  'True
  121.             ValueIncrCtrl   =   5
  122.             ValueIncrement  =   5
  123.             ValueIncrShift  =   5
  124.             ValueIncrShiftCtrl=   5
  125.          End
  126.          Begin Project1.MorphRangeRoamer mrrHorizontal 
  127.             Height          =   360
  128.             Left            =   3240
  129.             TabIndex        =   4
  130.             Top             =   3665
  131.             Width           =   735
  132.             _ExtentX        =   1296
  133.             _ExtentY        =   635
  134.             UD_BorderWidth  =   4
  135.             UD_ButtonDownAngle=   180
  136.             UD_ButtonUpAngle=   180
  137.             UD_IncrementInterval=   75
  138.             UD_Orientation  =   1
  139.             UD_ScrollDelay  =   100
  140.             ValueIncrCtrl   =   5
  141.             ValueIncrement  =   5
  142.             ValueIncrShift  =   5
  143.             ValueIncrShiftCtrl=   5
  144.          End
  145.          Begin Project1.MorphOptionCheck chkKeepAspectRatio 
  146.             Height          =   375
  147.             Left            =   360
  148.             TabIndex        =   6
  149.             Top             =   5160
  150.             Width           =   1455
  151.             _ExtentX        =   2566
  152.             _ExtentY        =   661
  153.             BackColor1      =   4210752
  154.             BackColor2      =   14737632
  155.             Caption         =   "Aspect Ratio"
  156.             CheckBoxAngle   =   45
  157.             CheckBoxColor1  =   4210752
  158.             CheckBoxColor2  =   16777215
  159.             CheckBoxMiddleOut=   0   'False
  160.             CheckColor      =   0
  161.             BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  162.                Name            =   "MS Sans Serif"
  163.                Size            =   8.25
  164.                Charset         =   0
  165.                Weight          =   400
  166.                Underline       =   0   'False
  167.                Italic          =   0   'False
  168.                Strikethrough   =   0   'False
  169.             EndProperty
  170.             MouseOverActions=   3
  171.             MOverBorderColor=   16776960
  172.             MOverCheckBoxColor=   16776960
  173.             ShowFocusRect   =   0   'False
  174.             Value           =   1
  175.          End
  176.          Begin Project1.MorphOptionCheck optPicStyle 
  177.             Height          =   375
  178.             Index           =   1
  179.             Left            =   2760
  180.             TabIndex        =   7
  181.             Top             =   4560
  182.             Width           =   1455
  183.             _ExtentX        =   2566
  184.             _ExtentY        =   661
  185.             BackColor1      =   4210752
  186.             BackColor2      =   14737632
  187.             Caption         =   "Size To Fit"
  188.             CheckBoxAngle   =   45
  189.             CheckBoxColor1  =   4210752
  190.             CheckBoxColor2  =   16777215
  191.             CheckBoxMiddleOut=   0   'False
  192.             CheckColor      =   0
  193.             ControlType     =   1
  194.             BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  195.                Name            =   "MS Sans Serif"
  196.                Size            =   8.25
  197.                Charset         =   0
  198.                Weight          =   400
  199.                Underline       =   0   'False
  200.                Italic          =   0   'False
  201.                Strikethrough   =   0   'False
  202.             EndProperty
  203.             MouseOverActions=   3
  204.             MOverBorderColor=   16776960
  205.             MOverCheckBoxColor=   16776960
  206.             ShowFocusRect   =   0   'False
  207.          End
  208.          Begin Project1.MorphOptionCheck chkEnabled 
  209.             Height          =   375
  210.             Left            =   2760
  211.             TabIndex        =   12
  212.             Top             =   5160
  213.             Width           =   1455
  214.             _ExtentX        =   2566
  215.             _ExtentY        =   661
  216.             BackColor1      =   4210752
  217.             BackColor2      =   14737632
  218.             Caption         =   "Enabled"
  219.             CheckBoxAngle   =   45
  220.             CheckBoxColor1  =   4210752
  221.             CheckBoxColor2  =   16777215
  222.             CheckBoxMiddleOut=   0   'False
  223.             CheckColor      =   0
  224.             BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  225.                Name            =   "MS Sans Serif"
  226.                Size            =   8.25
  227.                Charset         =   0
  228.                Weight          =   400
  229.                Underline       =   0   'False
  230.                Italic          =   0   'False
  231.                Strikethrough   =   0   'False
  232.             EndProperty
  233.             MouseOverActions=   3
  234.             MOverBorderColor=   16776960
  235.             MOverCheckBoxColor=   16776960
  236.             ShowFocusRect   =   0   'False
  237.             Value           =   1
  238.          End
  239.          Begin VB.Label lblColorAtCursor 
  240.             BackStyle       =   0  'Transparent
  241.             Caption         =   "Color at Cursor:"
  242.             Height          =   255
  243.             Left            =   1080
  244.             TabIndex        =   13
  245.             Top             =   4200
  246.             Width           =   2175
  247.          End
  248.          Begin VB.Label lblDispY1 
  249.             BackStyle       =   0  'Transparent
  250.             Caption         =   "Mouse X: 0"
  251.             Height          =   255
  252.             Left            =   1680
  253.             TabIndex        =   11
  254.             Top             =   3840
  255.             Width           =   1335
  256.          End
  257.          Begin VB.Label lblDispX1 
  258.             BackStyle       =   0  'Transparent
  259.             Caption         =   "Mouse X: 0"
  260.             Height          =   255
  261.             Left            =   1680
  262.             TabIndex        =   10
  263.             Top             =   3600
  264.             Width           =   1335
  265.          End
  266.          Begin VB.Label lblY 
  267.             BackStyle       =   0  'Transparent
  268.             Caption         =   "Mouse Y: 0"
  269.             Height          =   255
  270.             Left            =   2520
  271.             TabIndex        =   9
  272.             Top             =   480
  273.             Width           =   1575
  274.          End
  275.          Begin VB.Label lblX 
  276.             BackStyle       =   0  'Transparent
  277.             Caption         =   "Mouse X: 0"
  278.             Height          =   255
  279.             Left            =   600
  280.             TabIndex        =   8
  281.             Top             =   480
  282.             Width           =   1575
  283.          End
  284.       End
  285.    End
  286. End
  287. Attribute VB_Name = "Form1"
  288. Attribute VB_GlobalNameSpace = False
  289. Attribute VB_Creatable = False
  290. Attribute VB_PredeclaredId = True
  291. Attribute VB_Exposed = False
  292. Private Sub chkEnabled_Click()
  293.    If chkEnabled.Value = vbChecked Then
  294.       mpvNavigate.Enabled = True
  295.    Else
  296.       mpvNavigate.Enabled = False
  297.    End If
  298. End Sub
  299.  
  300. Private Sub chkKeepAspectRatio_Click()
  301.    If chkKeepAspectRatio.Value = vbChecked Then
  302.       mpvNavigate.KeepAspectRatio = True
  303.    Else
  304.       mpvNavigate.KeepAspectRatio = False
  305.    End If
  306. End Sub
  307.  
  308. Private Sub Form_Load()
  309.  
  310.    mrrVertical.ValueMin = 0
  311.    mrrVertical.ValueMax = mpvNavigate.PicHeight - 1
  312.    mrrVertical.Value = 0
  313.  
  314.    mrrHorizontal.ValueMin = mpvNavigate.PicY
  315.    mrrHorizontal.ValueMax = mpvNavigate.PicWidth - 1
  316.    mrrHorizontal.Value = mpvNavigate.PicX
  317.  
  318. End Sub
  319.  
  320.  
  321. Private Sub mpvNavigate_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  322.  
  323. '  update value properties w/coords of top left displayed image portion.
  324.    mrrHorizontal.Value = mpvNavigate.DispX1
  325.    mrrVertical.Value = mpvNavigate.DispY1
  326.  
  327.    lblX.Caption = "Mouse X: " & CStr(mpvNavigate.PicX)
  328.    lblY.Caption = "Mouse Y: " & CStr(mpvNavigate.PicY)
  329.    lblDispX1.Caption = "Upper Left X: " & CStr(mpvNavigate.DispX1)
  330.    lblDispY1.Caption = "Upper Left Y: " & CStr(mpvNavigate.DispY1)
  331.    lblColorAtCursor.Caption = "Color at Cursor: " & mpvNavigate.ColorAtCursor
  332.  
  333. End Sub
  334.  
  335. Private Sub mrrVertical_Change()
  336.    mpvNavigate.DisplayImage 0, -1, mrrVertical.Value
  337.    lblDispX1.Caption = "Upper Left X: " & CStr(mpvNavigate.DispX1)
  338.    lblDispY1.Caption = "Upper Left Y: " & CStr(mpvNavigate.DispY1)
  339. End Sub
  340.  
  341. Private Sub mrrVertical_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  342.    mrrVertical.Value = mpvNavigate.DispY1
  343. End Sub
  344.  
  345. Private Sub mrrHorizontal_Change()
  346.    mpvNavigate.DisplayImage 0, mrrHorizontal.Value, -1
  347.    lblDispX1.Caption = "Upper Left X: " & CStr(mpvNavigate.DispX1)
  348.    lblDispY1.Caption = "Upper Left Y: " & CStr(mpvNavigate.DispY1)
  349. End Sub
  350.  
  351. Private Sub mrrHorizontal_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  352.    mrrHorizontal.Value = mpvNavigate.DispX1
  353. End Sub
  354.  
  355.  
  356. Private Sub optPicStyle_Click(Index As Integer)
  357.    Select Case Index
  358.       Case 0
  359.          mpvNavigate.PictureMode = mpv_Normal
  360.       Case 1
  361.          mpvNavigate.PictureMode = mpv_Stretch
  362.    End Select
  363. End Sub
  364.  
  365.  
  366.