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

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  3. Begin VB.Form Form1 
  4.    BackColor       =   &H00E0E0E0&
  5.    Caption         =   "                                      Picture Editor"
  6.    ClientHeight    =   7215
  7.    ClientLeft      =   60
  8.    ClientTop       =   450
  9.    ClientWidth     =   6405
  10.    ControlBox      =   0   'False
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   7215
  13.    ScaleWidth      =   6405
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin VB.CommandButton cmdExit 
  16.       Caption         =   "Cancel"
  17.       Height          =   525
  18.       Left            =   4530
  19.       TabIndex        =   56
  20.       Top             =   6510
  21.       Width           =   1740
  22.    End
  23.    Begin VB.CommandButton Command6 
  24.       Caption         =   "Okay"
  25.       Height          =   525
  26.       Left            =   2160
  27.       TabIndex        =   55
  28.       Top             =   6510
  29.       Width           =   2145
  30.    End
  31.    Begin VB.CommandButton Command5 
  32.       Caption         =   "Reset"
  33.       Height          =   285
  34.       Left            =   9030
  35.       TabIndex        =   54
  36.       Top             =   5760
  37.       Width           =   900
  38.    End
  39.    Begin VB.CommandButton Command4 
  40.       Caption         =   "Reset"
  41.       Height          =   270
  42.       Left            =   6930
  43.       TabIndex        =   53
  44.       Top             =   5745
  45.       Width           =   1215
  46.    End
  47.    Begin VB.CommandButton Command3 
  48.       Caption         =   "Reset"
  49.       Height          =   315
  50.       Left            =   3795
  51.       TabIndex        =   52
  52.       Top             =   5745
  53.       Width           =   2025
  54.    End
  55.    Begin VB.CommandButton Command2 
  56.       Caption         =   "Reset"
  57.       Height          =   315
  58.       Left            =   360
  59.       TabIndex        =   51
  60.       Top             =   5745
  61.       Width           =   1875
  62.    End
  63.    Begin VB.CommandButton Command1 
  64.       Caption         =   "Open Picture"
  65.       Height          =   540
  66.       Left            =   105
  67.       TabIndex        =   40
  68.       Top             =   6495
  69.       Width           =   1875
  70.    End
  71.    Begin MSComDlg.CommonDialog cde 
  72.       Left            =   5625
  73.       Top             =   7320
  74.       _ExtentX        =   847
  75.       _ExtentY        =   847
  76.       _Version        =   393216
  77.    End
  78.    Begin VB.OptionButton Option1 
  79.       Caption         =   "Cool white lamp or Fluorescent"
  80.       Height          =   255
  81.       Index           =   16
  82.       Left            =   7620
  83.       TabIndex        =   39
  84.       Top             =   2760
  85.       Width           =   2535
  86.    End
  87.    Begin VB.OptionButton Option1 
  88.       Caption         =   "Northern daylight"
  89.       Height          =   255
  90.       Index           =   15
  91.       Left            =   7620
  92.       TabIndex        =   38
  93.       Top             =   2400
  94.       Width           =   2535
  95.    End
  96.    Begin VB.OptionButton Option1 
  97.       Caption         =   "Bond paper print"
  98.       Height          =   255
  99.       Index           =   14
  100.       Left            =   7620
  101.       TabIndex        =   37
  102.       Top             =   2040
  103.       Width           =   2535
  104.    End
  105.    Begin VB.OptionButton Option1 
  106.       Caption         =   "Normal print"
  107.       Height          =   255
  108.       Index           =   13
  109.       Left            =   7620
  110.       TabIndex        =   36
  111.       Top             =   1680
  112.       Width           =   2535
  113.    End
  114.    Begin VB.OptionButton Option1 
  115.       Caption         =   "NTSC daylight"
  116.       Height          =   195
  117.       Index           =   12
  118.       Left            =   7620
  119.       TabIndex        =   35
  120.       Top             =   1380
  121.       Width           =   2535
  122.    End
  123.    Begin VB.OptionButton Option1 
  124.       Caption         =   "Noon sunlight"
  125.       Height          =   255
  126.       Index           =   11
  127.       Left            =   7620
  128.       TabIndex        =   34
  129.       Top             =   1020
  130.       Width           =   2535
  131.    End
  132.    Begin VB.OptionButton Option1 
  133.       Caption         =   "Tungsten lamp"
  134.       Height          =   255
  135.       Index           =   10
  136.       Left            =   7620
  137.       TabIndex        =   33
  138.       Top             =   660
  139.       Width           =   2475
  140.    End
  141.    Begin VB.OptionButton Option1 
  142.       Caption         =   "Default Illuminant"
  143.       Height          =   315
  144.       Index           =   9
  145.       Left            =   7620
  146.       TabIndex        =   32
  147.       Top             =   240
  148.       Value           =   -1  'True
  149.       Width           =   2535
  150.    End
  151.    Begin VB.TextBox Text1 
  152.       Appearance      =   0  'Flat
  153.       Height          =   255
  154.       Index           =   8
  155.       Left            =   7680
  156.       TabIndex        =   29
  157.       Text            =   "0"
  158.       Top             =   5400
  159.       Width           =   555
  160.    End
  161.    Begin VB.TextBox Text1 
  162.       Appearance      =   0  'Flat
  163.       Height          =   255
  164.       Index           =   7
  165.       Left            =   6780
  166.       TabIndex        =   28
  167.       Text            =   "10000"
  168.       Top             =   5400
  169.       Width           =   555
  170.    End
  171.    Begin VB.TextBox Text1 
  172.       Appearance      =   0  'Flat
  173.       Height          =   255
  174.       Index           =   6
  175.       Left            =   1860
  176.       TabIndex        =   27
  177.       Text            =   "0"
  178.       Top             =   5400
  179.       Width           =   555
  180.    End
  181.    Begin VB.TextBox Text1 
  182.       Appearance      =   0  'Flat
  183.       Height          =   255
  184.       Index           =   5
  185.       Left            =   9180
  186.       TabIndex        =   26
  187.       Text            =   "0"
  188.       Top             =   5400
  189.       Width           =   555
  190.    End
  191.    Begin VB.TextBox Text1 
  192.       Appearance      =   0  'Flat
  193.       Height          =   255
  194.       Index           =   4
  195.       Left            =   1020
  196.       TabIndex        =   25
  197.       Text            =   "0"
  198.       Top             =   5400
  199.       Width           =   555
  200.    End
  201.    Begin VB.TextBox Text1 
  202.       Appearance      =   0  'Flat
  203.       Height          =   255
  204.       Index           =   3
  205.       Left            =   5400
  206.       TabIndex        =   24
  207.       Text            =   "10000"
  208.       Top             =   5400
  209.       Width           =   555
  210.    End
  211.    Begin VB.TextBox Text1 
  212.       Appearance      =   0  'Flat
  213.       Height          =   255
  214.       Index           =   2
  215.       Left            =   4320
  216.       TabIndex        =   23
  217.       Text            =   "10000"
  218.       Top             =   5400
  219.       Width           =   555
  220.    End
  221.    Begin VB.TextBox Text1 
  222.       Appearance      =   0  'Flat
  223.       Height          =   255
  224.       Index           =   1
  225.       Left            =   3180
  226.       TabIndex        =   22
  227.       Text            =   "10000"
  228.       Top             =   5400
  229.       Width           =   555
  230.    End
  231.    Begin VB.VScrollBar vs 
  232.       Height          =   1695
  233.       Index           =   8
  234.       LargeChange     =   100
  235.       Left            =   7800
  236.       Max             =   4000
  237.       TabIndex        =   20
  238.       Top             =   3600
  239.       Width           =   315
  240.    End
  241.    Begin VB.VScrollBar vs 
  242.       Height          =   1695
  243.       Index           =   7
  244.       LargeChange     =   100
  245.       Left            =   6900
  246.       Max             =   10000
  247.       Min             =   6000
  248.       TabIndex        =   18
  249.       Top             =   3600
  250.       Value           =   10000
  251.       Width           =   315
  252.    End
  253.    Begin VB.VScrollBar vs 
  254.       Height          =   1695
  255.       Index           =   6
  256.       LargeChange     =   10
  257.       Left            =   1980
  258.       Max             =   100
  259.       Min             =   -100
  260.       TabIndex        =   16
  261.       Top             =   3600
  262.       Width           =   315
  263.    End
  264.    Begin VB.VScrollBar vs 
  265.       Height          =   1695
  266.       Index           =   5
  267.       Left            =   9300
  268.       Max             =   100
  269.       Min             =   -100
  270.       TabIndex        =   14
  271.       Top             =   3600
  272.       Width           =   315
  273.    End
  274.    Begin VB.VScrollBar vs 
  275.       Height          =   1695
  276.       Index           =   4
  277.       LargeChange     =   10
  278.       Left            =   1140
  279.       Max             =   100
  280.       Min             =   -100
  281.       TabIndex        =   12
  282.       Top             =   3600
  283.       Width           =   315
  284.    End
  285.    Begin VB.VScrollBar vs 
  286.       Height          =   1695
  287.       Index           =   3
  288.       LargeChange     =   500
  289.       Left            =   5520
  290.       Max             =   30000
  291.       Min             =   2500
  292.       TabIndex        =   9
  293.       Top             =   3600
  294.       Value           =   10000
  295.       Width           =   315
  296.    End
  297.    Begin VB.VScrollBar vs 
  298.       Height          =   1695
  299.       Index           =   2
  300.       LargeChange     =   500
  301.       Left            =   4440
  302.       Max             =   30000
  303.       Min             =   2500
  304.       TabIndex        =   8
  305.       Top             =   3600
  306.       Value           =   10000
  307.       Width           =   315
  308.    End
  309.    Begin VB.VScrollBar vs 
  310.       Height          =   1695
  311.       Index           =   1
  312.       LargeChange     =   500
  313.       Left            =   3300
  314.       Max             =   30000
  315.       Min             =   2500
  316.       TabIndex        =   5
  317.       Top             =   3600
  318.       Value           =   10000
  319.       Width           =   315
  320.    End
  321.    Begin VB.CheckBox Check1 
  322.       BackColor       =   &H00E0E0E0&
  323.       Caption         =   "Negative"
  324.       Height          =   255
  325.       Left            =   2475
  326.       TabIndex        =   4
  327.       Top             =   5820
  328.       Width           =   1035
  329.    End
  330.    Begin VB.TextBox Text1 
  331.       Appearance      =   0  'Flat
  332.       Height          =   255
  333.       Index           =   0
  334.       Left            =   120
  335.       TabIndex        =   3
  336.       Text            =   "0"
  337.       Top             =   5400
  338.       Width           =   555
  339.    End
  340.    Begin VB.VScrollBar vs 
  341.       Height          =   1695
  342.       Index           =   0
  343.       LargeChange     =   10
  344.       Left            =   240
  345.       Max             =   100
  346.       Min             =   -100
  347.       TabIndex        =   2
  348.       Top             =   3600
  349.       Width           =   315
  350.    End
  351.    Begin VB.PictureBox Picture2 
  352.       BackColor       =   &H00FFFFFF&
  353.       Height          =   1920
  354.       Left            =   3285
  355.       ScaleHeight     =   124
  356.       ScaleMode       =   3  'Pixel
  357.       ScaleWidth      =   187
  358.       TabIndex        =   1
  359.       Top             =   435
  360.       Width           =   2865
  361.    End
  362.    Begin VB.PictureBox Picture1 
  363.       AutoRedraw      =   -1  'True
  364.       BackColor       =   &H00FFFFFF&
  365.       Height          =   1920
  366.       Left            =   240
  367.       ScaleHeight     =   1860
  368.       ScaleWidth      =   2805
  369.       TabIndex        =   0
  370.       Top             =   420
  371.       Width           =   2865
  372.    End
  373.    Begin VB.Image Image1 
  374.       Height          =   1920
  375.       Left            =   6645
  376.       Stretch         =   -1  'True
  377.       Top             =   7500
  378.       Width           =   2895
  379.    End
  380.    Begin VB.Label Label15 
  381.       AutoSize        =   -1  'True
  382.       BackStyle       =   0  'Transparent
  383.       Caption         =   "+"
  384.       Height          =   195
  385.       Left            =   2340
  386.       TabIndex        =   50
  387.       Top             =   4740
  388.       Width           =   90
  389.    End
  390.    Begin VB.Label Label14 
  391.       BackStyle       =   0  'Transparent
  392.       Caption         =   "-"
  393.       BeginProperty Font 
  394.          Name            =   "MS Sans Serif"
  395.          Size            =   12
  396.          Charset         =   0
  397.          Weight          =   400
  398.          Underline       =   0   'False
  399.          Italic          =   0   'False
  400.          Strikethrough   =   0   'False
  401.       EndProperty
  402.       Height          =   255
  403.       Left            =   2340
  404.       TabIndex        =   49
  405.       Top             =   3900
  406.       Width           =   135
  407.    End
  408.    Begin VB.Label Label23 
  409.       BackStyle       =   0  'Transparent
  410.       Caption         =   "100 %"
  411.       Height          =   315
  412.       Left            =   7320
  413.       TabIndex        =   48
  414.       Top             =   4860
  415.       Width           =   495
  416.    End
  417.    Begin VB.Label Label22 
  418.       BackStyle       =   0  'Transparent
  419.       Caption         =   "0 %"
  420.       Height          =   315
  421.       Left            =   8160
  422.       TabIndex        =   47
  423.       Top             =   3840
  424.       Width           =   315
  425.    End
  426.    Begin VB.Label Label21 
  427.       BackStyle       =   0  'Transparent
  428.       Caption         =   "100 %"
  429.       Height          =   315
  430.       Left            =   7200
  431.       TabIndex        =   46
  432.       Top             =   3780
  433.       Width           =   495
  434.    End
  435.    Begin VB.Label Label20 
  436.       BackStyle       =   0  'Transparent
  437.       Caption         =   "0 %"
  438.       Height          =   315
  439.       Left            =   6600
  440.       TabIndex        =   45
  441.       Top             =   4860
  442.       Width           =   315
  443.    End
  444.    Begin VB.Label Label19 
  445.       AutoSize        =   -1  'True
  446.       BackStyle       =   0  'Transparent
  447.       Caption         =   "+"
  448.       Height          =   195
  449.       Left            =   600
  450.       TabIndex        =   44
  451.       Top             =   4740
  452.       Width           =   90
  453.    End
  454.    Begin VB.Label Label18 
  455.       BackStyle       =   0  'Transparent
  456.       Caption         =   "-"
  457.       BeginProperty Font 
  458.          Name            =   "MS Sans Serif"
  459.          Size            =   12
  460.          Charset         =   0
  461.          Weight          =   400
  462.          Underline       =   0   'False
  463.          Italic          =   0   'False
  464.          Strikethrough   =   0   'False
  465.       EndProperty
  466.       Height          =   255
  467.       Left            =   600
  468.       TabIndex        =   43
  469.       Top             =   3900
  470.       Width           =   135
  471.    End
  472.    Begin VB.Label Label17 
  473.       AutoSize        =   -1  'True
  474.       BackStyle       =   0  'Transparent
  475.       Caption         =   "+"
  476.       Height          =   195
  477.       Left            =   1500
  478.       TabIndex        =   42
  479.       Top             =   4740
  480.       Width           =   90
  481.    End
  482.    Begin VB.Label Label16 
  483.       BackStyle       =   0  'Transparent
  484.       Caption         =   "-"
  485.       BeginProperty Font 
  486.          Name            =   "MS Sans Serif"
  487.          Size            =   12
  488.          Charset         =   0
  489.          Weight          =   400
  490.          Underline       =   0   'False
  491.          Italic          =   0   'False
  492.          Strikethrough   =   0   'False
  493.       EndProperty
  494.       Height          =   255
  495.       Left            =   1500
  496.       TabIndex        =   41
  497.       Top             =   3900
  498.       Width           =   135
  499.    End
  500.    Begin VB.Shape Shape5 
  501.       Height          =   3015
  502.       Left            =   7500
  503.       Top             =   120
  504.       Width           =   2715
  505.    End
  506.    Begin VB.Label Label11 
  507.       BackStyle       =   0  'Transparent
  508.       Caption         =   "Green"
  509.       Height          =   255
  510.       Left            =   8820
  511.       TabIndex        =   31
  512.       Top             =   4740
  513.       Width           =   435
  514.    End
  515.    Begin VB.Label Label10 
  516.       BackStyle       =   0  'Transparent
  517.       Caption         =   "Red"
  518.       Height          =   255
  519.       Left            =   9720
  520.       TabIndex        =   30
  521.       Top             =   3960
  522.       Width           =   375
  523.    End
  524.    Begin VB.Shape Shape4 
  525.       Height          =   2475
  526.       Left            =   8760
  527.       Top             =   3240
  528.       Width           =   1455
  529.    End
  530.    Begin VB.Shape Shape3 
  531.       Height          =   2475
  532.       Left            =   6540
  533.       Top             =   3240
  534.       Width           =   1935
  535.    End
  536.    Begin VB.Shape Shape2 
  537.       Height          =   2475
  538.       Left            =   2940
  539.       Top             =   3240
  540.       Width           =   3315
  541.    End
  542.    Begin VB.Shape Shape1 
  543.       Height          =   2475
  544.       Left            =   60
  545.       Top             =   3240
  546.       Width           =   2595
  547.    End
  548.    Begin VB.Label Label9 
  549.       BackStyle       =   0  'Transparent
  550.       Caption         =   "To Black"
  551.       Height          =   255
  552.       Left            =   7620
  553.       TabIndex        =   21
  554.       Top             =   3360
  555.       Width           =   915
  556.    End
  557.    Begin VB.Label Label8 
  558.       BackStyle       =   0  'Transparent
  559.       Caption         =   "To White"
  560.       Height          =   255
  561.       Left            =   6660
  562.       TabIndex        =   19
  563.       Top             =   3360
  564.       Width           =   915
  565.    End
  566.    Begin VB.Label Label7 
  567.       BackStyle       =   0  'Transparent
  568.       Caption         =   "Color"
  569.       Height          =   255
  570.       Left            =   1980
  571.       TabIndex        =   17
  572.       Top             =   3360
  573.       Width           =   435
  574.    End
  575.    Begin VB.Label Label6 
  576.       BackStyle       =   0  'Transparent
  577.       Caption         =   "Red/Green Tint"
  578.       Height          =   255
  579.       Left            =   8940
  580.       TabIndex        =   15
  581.       Top             =   3300
  582.       Width           =   1275
  583.    End
  584.    Begin VB.Label Label5 
  585.       BackStyle       =   0  'Transparent
  586.       Caption         =   "Brightness"
  587.       Height          =   255
  588.       Left            =   960
  589.       TabIndex        =   13
  590.       Top             =   3360
  591.       Width           =   795
  592.    End
  593.    Begin VB.Label Label4 
  594.       BackStyle       =   0  'Transparent
  595.       Caption         =   "Blue Gamma "
  596.       Height          =   255
  597.       Left            =   5280
  598.       TabIndex        =   11
  599.       Top             =   3360
  600.       Width           =   1095
  601.    End
  602.    Begin VB.Label Label3 
  603.       BackStyle       =   0  'Transparent
  604.       Caption         =   "Green Gamma "
  605.       Height          =   255
  606.       Left            =   4020
  607.       TabIndex        =   10
  608.       Top             =   3360
  609.       Width           =   1095
  610.    End
  611.    Begin VB.Label Label2 
  612.       BackStyle       =   0  'Transparent
  613.       Caption         =   "Red Gamma "
  614.       Height          =   255
  615.       Left            =   3000
  616.       TabIndex        =   7
  617.       Top             =   3360
  618.       Width           =   915
  619.    End
  620.    Begin VB.Label Label1 
  621.       BackStyle       =   0  'Transparent
  622.       Caption         =   "Contrast"
  623.       Height          =   255
  624.       Left            =   120
  625.       TabIndex        =   6
  626.       Top             =   3360
  627.       Width           =   795
  628.    End
  629. End
  630. Attribute VB_Name = "Form1"
  631. Attribute VB_GlobalNameSpace = False
  632. Attribute VB_Creatable = False
  633. Attribute VB_PredeclaredId = True
  634. Attribute VB_Exposed = False
  635. Option Explicit
  636.  
  637. ' Change Color Ver. 1.0.0 27/2/2004
  638. '
  639. ' This code show how to use the COLORADJUSTMENT API.
  640. ' Only for Windows NT/2000/XP
  641. '
  642. ' This code is copyright Xip3000 -2004-
  643.  
  644. Const HALFTONE = 4
  645. Const ILLUMINANT_DEVICE_DEFAULT = 0
  646. Const ILLUMINANT_A = 1
  647. Const ILLUMINANT_B = 2
  648. Const ILLUMINANT_C = 3
  649. Const ILLUMINANT_D50 = 4
  650. Const ILLUMINANT_D55 = 5
  651. Const ILLUMINANT_D65 = 6
  652. Const ILLUMINANT_D75 = 7
  653. Const ILLUMINANT_F2 = 8
  654. Const NEGATIVE = &H1
  655. Const NORMAL = &H0
  656.  
  657. Private Type COLORADJUSTMENT
  658.         caSize As Integer
  659.         caFlags As Integer
  660.         caIlluminantIndex As Integer
  661.         caRedGamma As Integer
  662.         caGreenGamma As Integer
  663.         caBlueGamma As Integer
  664.         caReferenceBlack As Integer
  665.         caReferenceWhite As Integer
  666.         caContrast As Integer
  667.         caBrightness As Integer
  668.         caColorfulness As Integer
  669.         caRedGreenTint As Integer
  670. End Type
  671. Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long
  672. Private Declare Function SetStretchBltMode Lib "gdi32" (ByVal hdc As Long, ByVal nStretchMode As Long) As Long
  673. Private Declare Function GetColorAdjustment Lib "gdi32" (ByVal hdc As Long, lpca As COLORADJUSTMENT) As Long
  674. Private Declare Function SetColorAdjustment Lib "gdi32" (ByVal hdc As Long, lpca As COLORADJUSTMENT) As Long
  675.  
  676.  
  677. Private Sub Check1_Click()
  678.     canvia (17)
  679. End Sub
  680.  
  681. Private Sub cmdExit_Click()
  682.    Form1.Hide
  683.    frmMain.Show
  684. End Sub
  685.  
  686. Private Sub Command1_Click()
  687.     On Error GoTo error:
  688.  
  689.     With cde
  690.         .DialogTitle = "Open Picture"
  691.         .Filter = "Pictures (*.Bmp *.Jpg *.Gif)|*.bmp; *.jpg; *.gif"
  692.         .ShowOpen
  693.         Image1.Picture = LoadPicture(cde.FileName)
  694.         Picture1.Width = Image1.Width
  695.         Picture1.Height = Image1.Height
  696.         Picture2.Width = Picture1.Width
  697.         Picture2.Height = Picture1.Height
  698.         Picture1.PaintPicture Image1, 0, 0, Image1.Width, Image1.Height
  699.         Picture1.Picture = Picture1.Image
  700.         Picture2.Picture = Picture1.Picture
  701.     End With
  702.     Exit Sub
  703. error:
  704.     Err.Clear
  705. End Sub
  706.  
  707. Public Sub Command2_Click()
  708.    vs(0).Value = 0
  709.    canvia (0)
  710.    vs(4).Value = 0
  711.    canvia 4
  712.    vs(6).Value = 0
  713.    canvia 6
  714. End Sub
  715.  
  716. Public Sub Command3_Click()
  717.    vs(1).Value = 10000
  718.    canvia 1
  719.    vs(2).Value = 10000
  720.    canvia 2
  721.    vs(3).Value = 10000
  722.    canvia 3
  723. End Sub
  724.  
  725. Private Sub Command4_Click()
  726.    vs(7).Value = 10000
  727.    canvia 7
  728.    vs(8).Value = 0
  729.    canvia 8
  730. End Sub
  731.  
  732. Private Sub Command5_Click()
  733.    vs(5).Value = 0
  734.    canvia 5
  735. End Sub
  736.  
  737. Private Sub Command6_Click()
  738.    StretchBlt frmMain.picDisplay(frmMain.SelPos).hdc, 0, 0, Picture2.ScaleWidth, Picture2.ScaleHeight, Picture2.hdc, 0, 0, Picture2.ScaleWidth, Picture2.ScaleHeight, vbSrcCopy
  739.    Form1.Hide
  740.    frmMain.Show
  741.    frmMain.cmdSPP.Enabled = True
  742. End Sub
  743.  
  744. Private Sub Form_Load()
  745.     Command2_Click
  746.     Command3_Click
  747. End Sub
  748.  
  749. Private Sub Option1_Click(Index As Integer)
  750.     canvia (Index)
  751. End Sub
  752.  
  753. Private Sub VS_scroll(Index As Integer)
  754.     canvia (Index)
  755. End Sub
  756. Private Sub canvia(es As Integer)
  757.     Dim TheColor As COLORADJUSTMENT
  758.     'Get actual Color Adjustment into Picture2
  759.     GetColorAdjustment Picture2.hdc, TheColor
  760.     TheColor.caSize = Len(TheColor)
  761.  
  762.     Select Case es
  763.         Case 0
  764.         'Change Contrast
  765.             TheColor.caContrast = vs(es).Value
  766.         Case 1
  767.         'Change Red Gamma
  768.             TheColor.caRedGamma = vs(es).Value
  769.         Case 2
  770.         'Change Green Gamma
  771.             TheColor.caGreenGamma = vs(es).Value
  772.         Case 3
  773.         'Change Blue Gamma
  774.             TheColor.caBlueGamma = vs(es).Value
  775.         Case 4
  776.         'Change Brightness
  777.             TheColor.caBrightness = vs(es).Value
  778.         Case 5
  779.         'Change Red Green Tint
  780.             TheColor.caRedGreenTint = vs(es).Value
  781.         Case 6
  782.         'Change to Color/BN or BN/Color
  783.             TheColor.caColorfulness = vs(es).Value
  784.         Case 7
  785.         'Change Reference White
  786.             TheColor.caReferenceWhite = vs(es).Value
  787.         Case 8
  788.         'Change Reference Black
  789.             TheColor.caReferenceBlack = vs(es).Value
  790.         Case 9
  791.         'Change Illuminant to default
  792.             TheColor.caIlluminantIndex = ILLUMINANT_DEVICE_DEFAULT
  793.         Case 10
  794.         'Change Illuminant to Tungsten lamp
  795.             TheColor.caIlluminantIndex = ILLUMINANT_A
  796.         Case 11
  797.         'Change Illuminant to Noon sunlight
  798.             TheColor.caIlluminantIndex = ILLUMINANT_B
  799.         Case 12
  800.         'Change Illuminant to NTSC daylight
  801.             TheColor.caIlluminantIndex = ILLUMINANT_C
  802.         Case 13
  803.         'Change Illuminant to Normal print
  804.             TheColor.caIlluminantIndex = ILLUMINANT_D50
  805.         Case 14
  806.         'Change Illuminant to Bond paper print
  807.             TheColor.caIlluminantIndex = ILLUMINANT_D55
  808.         Case 15
  809.         'Change Illuminant to Northern daylight
  810.             TheColor.caIlluminantIndex = ILLUMINANT_D75
  811.         Case 16
  812.         'Change Illuminant to Cool white lamp or Fluorescent
  813.             TheColor.caIlluminantIndex = ILLUMINANT_F2
  814.         Case 17
  815.         'Change the image to Negative or Normal
  816.             If Check1 Then
  817.                 TheColor.caFlags = NEGATIVE 'Negative
  818.             Else
  819.                 TheColor.caFlags = NORMAL 'Normal
  820.             End If
  821.     End Select
  822.  
  823.     'Set the Picture2 to HALFTONE
  824.     SetStretchBltMode Picture2.hdc, HALFTONE
  825.     
  826.     'Set the parametres to Picture2
  827.     SetColorAdjustment Picture2.hdc, TheColor
  828.  
  829.     'Copy the picture from Picture1 to Picture2
  830.     StretchBlt Picture2.hdc, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, Picture1.hdc, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, vbSrcCopy
  831.     
  832.     If Not es > 8 Then
  833.         Text1(es) = vs(es).Value
  834.     End If
  835. End Sub
  836.