home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD1327.psc / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-10-18  |  36.5 KB  |  1,020 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
  3. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
  4. Begin VB.Form MainForm 
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "Drawer - first edition               By Jongmin Baek"
  7.    ClientHeight    =   7305
  8.    ClientLeft      =   1860
  9.    ClientTop       =   1455
  10.    ClientWidth     =   11625
  11.    ClipControls    =   0   'False
  12.    Icon            =   "Form1.frx":0000
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   7305
  16.    ScaleWidth      =   11625
  17.    Begin ComctlLib.Toolbar Toolbar1 
  18.       Align           =   1  'Align Top
  19.       Height          =   630
  20.       Left            =   0
  21.       TabIndex        =   3
  22.       Top             =   0
  23.       Width           =   11625
  24.       _ExtentX        =   20505
  25.       _ExtentY        =   1111
  26.       ButtonWidth     =   1402
  27.       ButtonHeight    =   953
  28.       AllowCustomize  =   0   'False
  29.       Appearance      =   1
  30.       _Version        =   327682
  31.       BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7} 
  32.          NumButtons      =   8
  33.          BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  34.             Caption         =   "Line"
  35.             Key             =   ""
  36.             Object.ToolTipText     =   "Draw a straight line!"
  37.             Object.Tag             =   ""
  38.             Style           =   2
  39.             Value           =   1
  40.          EndProperty
  41.          BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  42.             Caption         =   "Pencil"
  43.             Key             =   ""
  44.             Object.ToolTipText     =   "Draw as you want!"
  45.             Object.Tag             =   ""
  46.             Style           =   2
  47.          EndProperty
  48.          BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  49.             Caption         =   "Eraser"
  50.             Key             =   ""
  51.             Object.ToolTipText     =   "Erase the bad things!"
  52.             Object.Tag             =   ""
  53.             Style           =   2
  54.          EndProperty
  55.          BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  56.             Caption         =   "Box"
  57.             Key             =   ""
  58.             Object.ToolTipText     =   "Draw boxes you want!"
  59.             Object.Tag             =   ""
  60.             Style           =   2
  61.          EndProperty
  62.          BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  63.             Caption         =   "Circle"
  64.             Key             =   ""
  65.             Object.ToolTipText     =   "Draw circles you want!"
  66.             Object.Tag             =   ""
  67.             Style           =   2
  68.          EndProperty
  69.          BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  70.             Caption         =   "Picker"
  71.             Key             =   ""
  72.             Object.ToolTipText     =   "Pick color you want from the picture!"
  73.             Object.Tag             =   ""
  74.             Style           =   2
  75.          EndProperty
  76.          BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  77.             Enabled         =   0   'False
  78.             Caption         =   "Paint"
  79.             Key             =   ""
  80.             Object.ToolTipText     =   "Paint the area you want! But Not available now."
  81.             Object.Tag             =   ""
  82.             Style           =   2
  83.          EndProperty
  84.          BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  85.             Caption         =   "Gradation"
  86.             Key             =   ""
  87.             Object.ToolTipText     =   "Make the Gradation you want!"
  88.             Object.Tag             =   ""
  89.             Style           =   2
  90.          EndProperty
  91.       EndProperty
  92.    End
  93.    Begin ComctlLib.ProgressBar ProgressBar1 
  94.       Height          =   135
  95.       Left            =   0
  96.       TabIndex        =   56
  97.       Top             =   7200
  98.       Width           =   11655
  99.       _ExtentX        =   20558
  100.       _ExtentY        =   238
  101.       _Version        =   327682
  102.       Appearance      =   1
  103.    End
  104.    Begin VB.Timer Timer1 
  105.       Interval        =   50
  106.       Left            =   6960
  107.       Top             =   3000
  108.    End
  109.    Begin VB.TextBox Text1 
  110.       Height          =   975
  111.       Left            =   6000
  112.       Locked          =   -1  'True
  113.       MultiLine       =   -1  'True
  114.       TabIndex        =   20
  115.       Text            =   "Form1.frx":12FA
  116.       Top             =   6120
  117.       Width           =   3015
  118.    End
  119.    Begin VB.CommandButton DialogBox 
  120.       Caption         =   "SecondColor Dialog"
  121.       Height          =   495
  122.       Index           =   1
  123.       Left            =   7440
  124.       TabIndex        =   19
  125.       Top             =   3240
  126.       Width           =   1575
  127.    End
  128.    Begin VB.HScrollBar Scroll 
  129.       Height          =   135
  130.       Index           =   5
  131.       Left            =   6000
  132.       Max             =   255
  133.       TabIndex        =   15
  134.       Top             =   5880
  135.       Value           =   255
  136.       Width           =   3015
  137.    End
  138.    Begin VB.HScrollBar Scroll 
  139.       Height          =   135
  140.       Index           =   4
  141.       Left            =   6000
  142.       Max             =   255
  143.       TabIndex        =   14
  144.       Top             =   5640
  145.       Value           =   255
  146.       Width           =   3015
  147.    End
  148.    Begin VB.HScrollBar Scroll 
  149.       Height          =   135
  150.       Index           =   3
  151.       Left            =   6000
  152.       Max             =   255
  153.       TabIndex        =   13
  154.       Top             =   5400
  155.       Value           =   255
  156.       Width           =   3015
  157.    End
  158.    Begin VB.HScrollBar Scroll 
  159.       Height          =   135
  160.       Index           =   2
  161.       Left            =   6000
  162.       Max             =   255
  163.       TabIndex        =   11
  164.       Top             =   4800
  165.       Width           =   3015
  166.    End
  167.    Begin VB.HScrollBar Scroll 
  168.       Height          =   135
  169.       Index           =   1
  170.       Left            =   6000
  171.       Max             =   255
  172.       TabIndex        =   10
  173.       Top             =   4560
  174.       Width           =   3015
  175.    End
  176.    Begin VB.HScrollBar Scroll 
  177.       Height          =   135
  178.       Index           =   0
  179.       Left            =   6000
  180.       Max             =   255
  181.       TabIndex        =   9
  182.       Top             =   4320
  183.       Width           =   3015
  184.    End
  185.    Begin VB.CommandButton DialogBox 
  186.       Caption         =   "FrontColor Dialog"
  187.       Height          =   495
  188.       Index           =   0
  189.       Left            =   7440
  190.       TabIndex        =   8
  191.       Top             =   2760
  192.       Width           =   1575
  193.    End
  194.    Begin VB.PictureBox ForeColorSample 
  195.       Appearance      =   0  'Flat
  196.       BackColor       =   &H80000006&
  197.       ForeColor       =   &H80000008&
  198.       Height          =   495
  199.       Left            =   6000
  200.       ScaleHeight     =   465
  201.       ScaleWidth      =   585
  202.       TabIndex        =   5
  203.       ToolTipText     =   "FrontColor"
  204.       Top             =   3000
  205.       Width           =   615
  206.    End
  207.    Begin VB.PictureBox BackColorSample 
  208.       Appearance      =   0  'Flat
  209.       BackColor       =   &H00FFFFFF&
  210.       ForeColor       =   &H80000008&
  211.       Height          =   495
  212.       Left            =   6240
  213.       ScaleHeight     =   465
  214.       ScaleWidth      =   585
  215.       TabIndex        =   6
  216.       ToolTipText     =   "Back Color"
  217.       Top             =   3240
  218.       Width           =   615
  219.    End
  220.    Begin MSComDlg.CommonDialog CommonDialog1 
  221.       Left            =   8280
  222.       Top             =   6120
  223.       _ExtentX        =   847
  224.       _ExtentY        =   847
  225.       _Version        =   327680
  226.       CancelError     =   -1  'True
  227.       Filter          =   "JPEG files|*.jpg|GIF files|*.GIF|Bitmap files|*.BMP|All Files|*.*"
  228.    End
  229.    Begin VB.PictureBox ColorBoard 
  230.       Appearance      =   0  'Flat
  231.       AutoSize        =   -1  'True
  232.       BackColor       =   &H80000005&
  233.       BorderStyle     =   0  'None
  234.       ForeColor       =   &H80000008&
  235.       Height          =   1695
  236.       Left            =   6000
  237.       MousePointer    =   2  'Cross
  238.       Picture         =   "Form1.frx":1361
  239.       ScaleHeight     =   1695
  240.       ScaleWidth      =   3000
  241.       TabIndex        =   1
  242.       ToolTipText     =   "Left Click - FrontColor, Right Click - BackColor"
  243.       Top             =   960
  244.       Width           =   3000
  245.    End
  246.    Begin VB.PictureBox MainPic 
  247.       AutoRedraw      =   -1  'True
  248.       BackColor       =   &H00FFFFFF&
  249.       Height          =   6375
  250.       Left            =   0
  251.       MousePointer    =   2  'Cross
  252.       ScaleHeight     =   6315
  253.       ScaleWidth      =   5835
  254.       TabIndex        =   0
  255.       Top             =   720
  256.       Width           =   5895
  257.       Begin VB.Shape Shape1 
  258.          BackStyle       =   1  'Opaque
  259.          BorderColor     =   &H00000000&
  260.          FillColor       =   &H00FFFFFF&
  261.          Height          =   300
  262.          Left            =   3120
  263.          Top             =   2160
  264.          Visible         =   0   'False
  265.          Width           =   300
  266.       End
  267.       Begin VB.Shape Shape2 
  268.          BorderStyle     =   3  'Dot
  269.          DrawMode        =   6  'Mask Pen Not
  270.          Height          =   1095
  271.          Left            =   720
  272.          Top             =   2640
  273.          Visible         =   0   'False
  274.          Width           =   1935
  275.       End
  276.       Begin VB.Line Line1 
  277.          BorderStyle     =   3  'Dot
  278.          DrawMode        =   6  'Mask Pen Not
  279.          Visible         =   0   'False
  280.          X1              =   1680
  281.          X2              =   3720
  282.          Y1              =   960
  283.          Y2              =   2760
  284.       End
  285.    End
  286.    Begin VB.Frame Optionframe 
  287.       Caption         =   "Circle or Picker or Paint Option"
  288.       Height          =   6255
  289.       Index           =   3
  290.       Left            =   9120
  291.       TabIndex        =   44
  292.       Top             =   720
  293.       Visible         =   0   'False
  294.       Width           =   2415
  295.       Begin VB.Label Label13 
  296.          Caption         =   "***Picker : Click the place (Left Click will pick frontcolor, Right Click will pick backcolor.)"
  297.          Height          =   735
  298.          Left            =   120
  299.          TabIndex        =   57
  300.          Top             =   1200
  301.          Width           =   2175
  302.       End
  303.       Begin VB.Label Label11 
  304.          Caption         =   "I'm sorry, but there is no option. I'll update this program. Please wait until update."
  305.          Height          =   735
  306.          Left            =   120
  307.          TabIndex        =   45
  308.          Top             =   480
  309.          Width           =   2175
  310.       End
  311.    End
  312.    Begin VB.Frame Optionframe 
  313.       Caption         =   "Gradation"
  314.       Height          =   6255
  315.       Index           =   4
  316.       Left            =   9120
  317.       TabIndex        =   46
  318.       Top             =   720
  319.       Visible         =   0   'False
  320.       Width           =   2415
  321.       Begin VB.Frame Frame1 
  322.          Caption         =   "Direction"
  323.          Height          =   975
  324.          Left            =   120
  325.          TabIndex        =   52
  326.          Top             =   240
  327.          Width           =   2175
  328.          Begin VB.OptionButton GradationDirection 
  329.             Caption         =   "Horizontal"
  330.             Height          =   255
  331.             Index           =   0
  332.             Left            =   120
  333.             TabIndex        =   54
  334.             Top             =   240
  335.             Value           =   -1  'True
  336.             Width           =   1935
  337.          End
  338.          Begin VB.OptionButton GradationDirection 
  339.             Caption         =   "Vertical"
  340.             Height          =   375
  341.             Index           =   1
  342.             Left            =   120
  343.             TabIndex        =   53
  344.             Top             =   480
  345.             Width           =   1935
  346.          End
  347.       End
  348.       Begin VB.Frame Frame2 
  349.          Caption         =   "Color"
  350.          Height          =   1335
  351.          Left            =   120
  352.          TabIndex        =   48
  353.          Top             =   1320
  354.          Width           =   2175
  355.          Begin VB.OptionButton GradationColor 
  356.             Caption         =   "ForeColor to BackColor"
  357.             Height          =   375
  358.             Index           =   0
  359.             Left            =   120
  360.             TabIndex        =   51
  361.             Top             =   240
  362.             Value           =   -1  'True
  363.             Width           =   1935
  364.          End
  365.          Begin VB.OptionButton GradationColor 
  366.             Caption         =   "ForeColor to White"
  367.             Height          =   255
  368.             Index           =   1
  369.             Left            =   120
  370.             TabIndex        =   50
  371.             Top             =   600
  372.             Width           =   1935
  373.          End
  374.          Begin VB.OptionButton GradationColor 
  375.             Caption         =   "ForeColor to Black"
  376.             Height          =   255
  377.             Index           =   2
  378.             Left            =   120
  379.             TabIndex        =   49
  380.             Top             =   960
  381.             Width           =   1935
  382.          End
  383.       End
  384.       Begin VB.PictureBox Picture1 
  385.          BackColor       =   &H80000009&
  386.          Height          =   3015
  387.          Left            =   120
  388.          ScaleHeight     =   2955
  389.          ScaleWidth      =   2115
  390.          TabIndex        =   47
  391.          Top             =   3120
  392.          Width           =   2175
  393.       End
  394.       Begin VB.Label Label12 
  395.          Caption         =   "Sample"
  396.          Height          =   255
  397.          Left            =   120
  398.          TabIndex        =   55
  399.          Top             =   2880
  400.          Width           =   1335
  401.       End
  402.    End
  403.    Begin VB.Frame Optionframe 
  404.       Caption         =   "Box Option"
  405.       Height          =   6255
  406.       Index           =   1
  407.       Left            =   9120
  408.       TabIndex        =   21
  409.       Top             =   720
  410.       Visible         =   0   'False
  411.       Width           =   2415
  412.       Begin VB.Frame BoxOptionFrame 
  413.          Caption         =   "Select Color of the Interior"
  414.          Height          =   1335
  415.          Left            =   120
  416.          TabIndex        =   23
  417.          Top             =   2040
  418.          Width           =   2175
  419.          Begin VB.OptionButton BoxOptionInterior 
  420.             Caption         =   "White"
  421.             Height          =   255
  422.             Index           =   3
  423.             Left            =   120
  424.             TabIndex        =   39
  425.             Top             =   960
  426.             Width           =   1815
  427.          End
  428.          Begin VB.OptionButton BoxOptionInterior 
  429.             Caption         =   "ForeColor"
  430.             Height          =   255
  431.             Index           =   0
  432.             Left            =   120
  433.             TabIndex        =   26
  434.             Top             =   240
  435.             Width           =   1815
  436.          End
  437.          Begin VB.OptionButton BoxOptionInterior 
  438.             Caption         =   "BackColor"
  439.             Height          =   255
  440.             Index           =   1
  441.             Left            =   120
  442.             TabIndex        =   25
  443.             Top             =   480
  444.             Width           =   1815
  445.          End
  446.          Begin VB.OptionButton BoxOptionInterior 
  447.             Caption         =   "Transparent"
  448.             Height          =   255
  449.             Index           =   2
  450.             Left            =   120
  451.             TabIndex        =   24
  452.             Top             =   720
  453.             Value           =   -1  'True
  454.             Width           =   1815
  455.          End
  456.       End
  457.       Begin VB.PictureBox BoxOptionPicture 
  458.          BackColor       =   &H00E0E0E0&
  459.          Height          =   1695
  460.          Left            =   120
  461.          ScaleHeight     =   1635
  462.          ScaleWidth      =   2115
  463.          TabIndex        =   22
  464.          Top             =   240
  465.          Width           =   2175
  466.          Begin VB.Shape BoxOptionSample 
  467.             FillColor       =   &H00FFFFFF&
  468.             Height          =   975
  469.             Left            =   600
  470.             Top             =   240
  471.             Width           =   975
  472.          End
  473.       End
  474.    End
  475.    Begin VB.Frame Optionframe 
  476.       Caption         =   "Line and Pencil Option"
  477.       Height          =   6255
  478.       Index           =   0
  479.       Left            =   9120
  480.       TabIndex        =   27
  481.       Top             =   720
  482.       Width           =   2415
  483.       Begin VB.Frame LineOptionFrame 
  484.          Caption         =   "Border Size"
  485.          Height          =   1575
  486.          Left            =   120
  487.          TabIndex        =   28
  488.          Top             =   240
  489.          Width           =   2175
  490.          Begin VB.CommandButton Command2 
  491.             Caption         =   "Change"
  492.             Height          =   375
  493.             Left            =   720
  494.             TabIndex        =   40
  495.             Top             =   600
  496.             Width           =   855
  497.          End
  498.          Begin VB.TextBox LineOptionText 
  499.             Height          =   375
  500.             Left            =   120
  501.             Locked          =   -1  'True
  502.             TabIndex        =   29
  503.             Text            =   "1"
  504.             Top             =   600
  505.             Width           =   615
  506.          End
  507.          Begin VB.Label Label7 
  508.             Caption         =   "Input the integer value between 1~10"
  509.             Height          =   375
  510.             Left            =   120
  511.             TabIndex        =   31
  512.             Top             =   1080
  513.             Width           =   1575
  514.          End
  515.          Begin VB.Label Label6 
  516.             Caption         =   "Input the Border Size"
  517.             Height          =   255
  518.             Left            =   120
  519.             TabIndex        =   30
  520.             Top             =   240
  521.             Width           =   1575
  522.          End
  523.          Begin VB.Line Line2 
  524.             X1              =   1920
  525.             X2              =   1920
  526.             Y1              =   480
  527.             Y2              =   1440
  528.          End
  529.       End
  530.    End
  531.    Begin VB.Frame Optionframe 
  532.       Caption         =   "Eraser Option"
  533.       Height          =   6255
  534.       Index           =   2
  535.       Left            =   9120
  536.       TabIndex        =   32
  537.       Top             =   720
  538.       Visible         =   0   'False
  539.       Width           =   2415
  540.       Begin VB.Frame EraserOptionFrame2 
  541.          Caption         =   "Color of the erased place"
  542.          Height          =   855
  543.          Left            =   120
  544.          TabIndex        =   41
  545.          Top             =   3360
  546.          Width           =   2175
  547.          Begin VB.OptionButton EraserOptionColor 
  548.             Caption         =   "White"
  549.             Height          =   255
  550.             Index           =   1
  551.             Left            =   120
  552.             TabIndex        =   43
  553.             Top             =   480
  554.             Value           =   -1  'True
  555.             Width           =   1935
  556.          End
  557.          Begin VB.OptionButton EraserOptionColor 
  558.             Caption         =   "BackColor"
  559.             Height          =   255
  560.             Index           =   0
  561.             Left            =   120
  562.             TabIndex        =   42
  563.             Top             =   240
  564.             Width           =   1935
  565.          End
  566.       End
  567.       Begin VB.Frame EraserOptionFrame 
  568.          Caption         =   "Eraser Size"
  569.          Height          =   3015
  570.          Left            =   120
  571.          TabIndex        =   33
  572.          Top             =   240
  573.          Width           =   2175
  574.          Begin VB.CommandButton Command1 
  575.             Caption         =   "Change"
  576.             Height          =   375
  577.             Left            =   1320
  578.             TabIndex        =   38
  579.             Top             =   720
  580.             Width           =   735
  581.          End
  582.          Begin VB.TextBox EraserOptionText 
  583.             Height          =   375
  584.             Left            =   120
  585.             Locked          =   -1  'True
  586.             MaxLength       =   3
  587.             TabIndex        =   34
  588.             Text            =   "300"
  589.             Top             =   720
  590.             Width           =   1215
  591.          End
  592.          Begin VB.Label Label10 
  593.             Caption         =   "Sample"
  594.             Height          =   255
  595.             Left            =   840
  596.             TabIndex        =   37
  597.             Top             =   1800
  598.             Width           =   615
  599.          End
  600.          Begin VB.Label Label9 
  601.             Caption         =   "Input the integer value between 100 ~ 500"
  602.             Height          =   375
  603.             Left            =   120
  604.             TabIndex        =   36
  605.             Top             =   1200
  606.             Width           =   1935
  607.          End
  608.          Begin VB.Label Label8 
  609.             Caption         =   "Input the Width of the eraser you want"
  610.             Height          =   375
  611.             Left            =   120
  612.             TabIndex        =   35
  613.             Top             =   240
  614.             Width           =   1575
  615.          End
  616.          Begin VB.Shape Shape3 
  617.             BackStyle       =   1  'Opaque
  618.             Height          =   300
  619.             Left            =   960
  620.             Top             =   2160
  621.             Width           =   300
  622.          End
  623.       End
  624.    End
  625.    Begin VB.Label RGBValue 
  626.       Caption         =   "RGB (255 , 255 , 255)"
  627.       Height          =   255
  628.       Index           =   1
  629.       Left            =   7200
  630.       TabIndex        =   18
  631.       Top             =   5040
  632.       Width           =   1815
  633.    End
  634.    Begin VB.Label RGBValue 
  635.       Caption         =   "RGB (0 , 0 , 0)"
  636.       Height          =   255
  637.       Index           =   0
  638.       Left            =   7200
  639.       TabIndex        =   17
  640.       Top             =   3960
  641.       Width           =   1815
  642.    End
  643.    Begin VB.Label Label5 
  644.       Caption         =   "BackColor"
  645.       Height          =   375
  646.       Left            =   6000
  647.       TabIndex        =   16
  648.       Top             =   5040
  649.       Width           =   1095
  650.    End
  651.    Begin VB.Label Label4 
  652.       Caption         =   "ForeColor"
  653.       Height          =   375
  654.       Left            =   6000
  655.       TabIndex        =   12
  656.       Top             =   3960
  657.       Width           =   855
  658.    End
  659.    Begin VB.Label Label3 
  660.       Caption         =   "Pick the Color you want"
  661.       Height          =   255
  662.       Left            =   6000
  663.       TabIndex        =   7
  664.       Top             =   720
  665.       Width           =   2895
  666.    End
  667.    Begin VB.Label Label2 
  668.       Caption         =   "Now the colors are.."
  669.       Height          =   255
  670.       Left            =   6000
  671.       TabIndex        =   4
  672.       Top             =   2760
  673.       Width           =   1695
  674.    End
  675.    Begin VB.Label Label1 
  676.       Caption         =   "Color Pick Board"
  677.       Height          =   255
  678.       Left            =   6000
  679.       TabIndex        =   2
  680.       Top             =   0
  681.       Width           =   1335
  682.    End
  683.    Begin VB.Menu MenuFile 
  684.       Caption         =   "&File"
  685.       Begin VB.Menu SubMenuNew 
  686.          Caption         =   "&New"
  687.          Shortcut        =   ^N
  688.       End
  689.       Begin VB.Menu SubMenuOpen 
  690.          Caption         =   "&Open..."
  691.          Shortcut        =   ^O
  692.       End
  693.       Begin VB.Menu SubMenuSave 
  694.          Caption         =   "&Save"
  695.          Enabled         =   0   'False
  696.       End
  697.       Begin VB.Menu SubMenuSaveAs 
  698.          Caption         =   "Sa&ve As..."
  699.          Enabled         =   0   'False
  700.          Shortcut        =   ^S
  701.       End
  702.       Begin VB.Menu Separator1 
  703.          Caption         =   "-"
  704.       End
  705.       Begin VB.Menu SubMenuExit 
  706.          Caption         =   "E&xit"
  707.          Shortcut        =   ^X
  708.       End
  709.    End
  710.    Begin VB.Menu MenuFilter 
  711.       Caption         =   "Fil&ter"
  712.       Begin VB.Menu SubMenuBlur 
  713.          Caption         =   "Mosaic"
  714.       End
  715.    End
  716. Attribute VB_Name = "MainForm"
  717. Attribute VB_GlobalNameSpace = False
  718. Attribute VB_Creatable = False
  719. Attribute VB_PredeclaredId = True
  720. Attribute VB_Exposed = False
  721. Dim EraserColor As Long
  722. Dim EraserSize As Integer
  723. Dim PencilSize As Integer
  724. Dim BoxInversed As Boolean
  725. Dim GradationChanged As Boolean
  726. Dim XX As Double, YY As Double
  727. Dim XX2 As Double, YY2 As Double
  728. Dim CurrentChoice
  729. Dim TheColor As Long
  730. Dim Red As Long
  731. Dim Green As Long
  732. Dim Blue As Long
  733. Dim SecondColor As Long
  734. Dim FirstColor As Long
  735. Private Sub BoxOptionInterior_Click(Index As Integer)
  736. BoxOptionSample.BackStyle = IIf(Index = 2, 0, 1)
  737. If Index = 0 Then BoxOptionSample.BackColor = FirstColor
  738. If Index = 1 Then BoxOptionSample.BackColor = SecondColor
  739. If Index = 3 Then BoxOptionSample.BackColor = &HFFFFFF
  740. End Sub
  741. Private Sub ColorBoard_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  742. On Error GoTo 10
  743. TheColor = ColorBoard.Point(X, Y)
  744. If Button <> 1 And Button <> 2 Then Exit Sub
  745. If Button = 1 Then ForeColorSample.BackColor = TheColor: FirstColor = TheColor: g = 0
  746. If Button = 2 Then BackColorSample.BackColor = TheColor: SecondColor = TheColor: g = 3
  747. Scroll(g).Value = TakeRGB(TheColor, 0): Scroll(g + 1).Value = TakeRGB(TheColor, 1): Scroll(g + 2).Value = TakeRGB(TheColor, 2)
  748. 10 End Sub
  749. Private Sub Command1_Click()
  750. f$ = InputBox("Input the size of the eraser", "Drawer V1.0", EraserOptionText.Text)
  751. f$ = RTrim$(LTrim$(f$))
  752. If " " + f$ <> Str$(Val(f$)) Then MsgBox "Input error!", vbOKOnly, "Drawer V1.0": Exit Sub
  753. If Val(f$) <> Int(Val(f$)) Then MsgBox "Input error!", vbOKOnly, "Drawer V1.0": Exit Sub
  754. If Val(f$) > 500 Or Val(f$) < 100 Then MsgBox "Input error!", vbOKOnly, "Drawer V1.0": Exit Sub
  755. EraserOptionText.Text = f$
  756. EraserSize = Val(f$)
  757. Shape3.Width = Val(f$): Shape3.Height = Val(f$)
  758. Shape1.Width = Val(f$): Shape1.Height = Val(f$)
  759. End Sub
  760. Private Sub Command2_Click()
  761. f$ = InputBox("Input the border of the line or pencil", "Drawer V1.0", LineOptionText.Text)
  762. f$ = RTrim$(LTrim$(f$))
  763. If " " + f$ <> Str$(Val(f$)) Then MsgBox "Input error!", vbOKOnly, "Drawer V1.0": Exit Sub
  764. If Val(f$) <> Int(Val(f$)) Then MsgBox "Input error!", vbOKOnly, "Drawer V1.0": Exit Sub
  765. If Val(f$) > 10 Or Val(f$) < 1 Then MsgBox "Input error!", vbOKOnly, "Drawer V1.0": Exit Sub
  766. LineOptionText.Text = f$
  767. PencilSize = Val(f$)
  768. Line2.BorderWidth = Val(f$)
  769. End Sub
  770. Private Sub DialogBox_Click(Index As Integer)
  771. Static coloring As Long
  772. On Error GoTo 100
  773. CommonDialog1.ShowColor
  774. coloring = CommonDialog1.Color
  775. Scroll(Index * 3).Value = TakeRGB(coloring, 0)
  776. Scroll(Index * 3 + 1).Value = TakeRGB(coloring, 1)
  777. Scroll(Index * 3 + 2).Value = TakeRGB(coloring, 2)
  778. End Sub
  779. Private Sub EraserOptionColor_Click(Index As Integer)
  780. EraserColor = IIf(Index = 0, SecondColor, &HFFFFFF)
  781. End Sub
  782. Private Sub EraserOptionText_GotFocus()
  783. Command1.SetFocus
  784. End Sub
  785. Private Sub Form_Load()
  786. EraserColor = &HFFFFFF
  787. PencilSize = 1
  788. EraserSize = 300
  789. CurrentChoice = 1
  790. FirstColor = &H0
  791. SecondColor = &HFFFFFF
  792. End Sub
  793. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  794. Shape1.Visible = False
  795. End Sub
  796. Private Sub GradationColor_Click(Index As Integer)
  797. GradationChanged = True
  798. End Sub
  799. Private Sub GradationDirection_Click(Index As Integer)
  800. GradationChanged = True
  801. End Sub
  802. Private Sub LineOptionText_GotFocus()
  803. Command2.SetFocus
  804. End Sub
  805. Private Sub MainPic_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  806. If Button <> 1 Then Exit Sub
  807. Select Case CurrentChoice
  808.     Case 1
  809.         Line1.X1 = X: Line1.X2 = X
  810.         Line1.Y1 = Y: Line1.Y2 = Y
  811.         Line1.Visible = True
  812.     Case 2
  813.         XX = X: YY = Y
  814.     Case 3
  815.         MainPic.Line (Shape1.Left, Shape1.Top)-(Shape1.Left + Shape1.Width, Shape1.Top + Shape1.Width), EraserColor, BF
  816.     Case 4, 5, 8
  817.         XX = X: YY = Y
  818.         XX2 = X: YY2 = Y
  819.         Shape2.Shape = IIf(CurrentChoice = 5, 2, 0)
  820.         Shape2.Visible = True
  821.         Shape2.Left = X: Shape2.Top = Y
  822.         Shape2.Width = 0: Shape2.Height = 0
  823. End Select
  824. End Sub
  825. Private Sub MainPic_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  826. If CurrentChoice = 3 Then
  827.         Shape1.Left = X - Shape1.Width / 2
  828.         Shape1.Top = Y - Shape1.Width / 2
  829.         Shape1.Visible = True
  830. End If
  831. If Button <> 1 Then GoTo 10
  832. Select Case CurrentChoice
  833.     Case 1
  834.         Line1.X2 = X: Line1.Y2 = Y
  835.     Case 2
  836.         MainPic.DrawWidth = PencilSize
  837.         MainPic.Line (XX, YY)-(X, Y), FirstColor: XX = X: YY = Y
  838.         MainPic.DrawWidth = 1
  839.     Case 3
  840.         MainPic.Line (Shape1.Left, Shape1.Top)-(Shape1.Left + Shape1.Width, Shape1.Top + Shape1.Width), EraserColor, BF
  841.     Case 4, 5, 8
  842.         XX2 = X: YY2 = Y
  843.         Shape2.Left = IIf(X > XX, XX, X)
  844.         Shape2.Top = IIf(Y > YY, YY, Y)
  845.         Shape2.Width = Abs(X - XX)
  846.         Shape2.Height = Abs(Y - YY)
  847.     Case 6
  848.         Scroll(0).Value = TakeRGB(MainPic.Point(X, Y), 0)
  849.         Scroll(1).Value = TakeRGB(MainPic.Point(X, Y), 1)
  850.         Scroll(2).Value = TakeRGB(MainPic.Point(X, Y), 2)
  851. End Select
  852. Exit Sub
  853. 10 If Button <> 2 Or CurrentChoice <> 6 Then Exit Sub
  854. Scroll(3).Value = TakeRGB(MainPic.Point(X, Y), 0)
  855. Scroll(4).Value = TakeRGB(MainPic.Point(X, Y), 1)
  856. Scroll(5).Value = TakeRGB(MainPic.Point(X, Y), 2)
  857. End Sub
  858. Private Sub MainPic_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  859. If Button <> 1 Then Exit Sub
  860. Select Case CurrentChoice
  861.     Case 1
  862.         MainPic.DrawWidth = PencilSize
  863.         MainPic.Line (Line1.X1, Line1.Y1)-(Line1.X2, Line1.Y2), FirstColor
  864.         MainPic.DrawWidth = 1
  865.         Line1.Visible = False
  866.     Case 4
  867.         If BoxOptionInterior(0).Value = True Then MainPic.Line (XX, YY)-(XX2, YY2), FirstColor, BF
  868.         If BoxOptionInterior(1).Value = True Then MainPic.Line (XX, YY)-(XX2, YY2), SecondColor, BF
  869.         If BoxOptionInterior(3).Value = True Then MainPic.Line (XX, YY)-(XX2, YY2), &HFFFFFF, BF
  870.         MainPic.Line (XX, YY)-(XX2, YY2), FirstColor, B
  871.         Shape2.Visible = False
  872.     Case 5
  873.         Rad = IIf(Abs(YY2 - YY) > Abs(XX2 - XX), Abs(YY2 - YY) / 2, Abs(XX2 - XX) / 2)
  874.         If XX2 <> XX Then MainPic.Circle ((XX2 + XX) / 2, (YY2 + YY) / 2), Rad, FirstColor, , , Abs(YY2 - YY) / Abs(XX2 - XX)
  875.         Shape2.Visible = False
  876.     Case 8
  877.         Dim sc1 As Long
  878.         Dim sc2 As Long
  879.         sc1 = FirstColor
  880.         If GradationColor(0).Value = True Then sc2 = SecondColor
  881.         If GradationColor(1).Value = True Then sc2 = &HFFFFFF
  882.         If GradationColor(2).Value = True Then sc2 = &H0
  883.         f1 = TakeRGB(sc2, 0): f2 = TakeRGB(sc2, 1): f3 = TakeRGB(sc2, 2)
  884.         v1 = TakeRGB(sc1, 0): v2 = TakeRGB(sc1, 1): v3 = TakeRGB(sc1, 2)
  885.         forstep = 10
  886.         If XX2 < XX Then xx3 = XX: XX = XX2: XX2 = xx3
  887.         If YY2 < YY Then yy3 = YY: YY = YY2: YY2 = yy3
  888.         ForStart = IIf(GradationDirection(0).Value = True, XX, YY)
  889.         Endpro = IIf(GradationDirection(0).Value = True, XX2, YY2)
  890.         For i = ForStart To Endpro Step forstep
  891.         D1 = v1 + (f1 - v1) / (Endpro - ForStart) * (i - ForStart)
  892.         D2 = v2 + (f2 - v2) / (Endpro - ForStart) * (i - ForStart)
  893.         D3 = v3 + (f3 - v3) / (Endpro - ForStart) * (i - ForStart)
  894.         If GradationDirection(0).Value = True Then MainPic.Line (i, YY)-(i, YY2), RGB(D1, D2, D3)
  895.         If GradationDirection(1).Value = True Then MainPic.Line (XX, i)-(XX2, i), RGB(D1, D2, D3)
  896.         Next i
  897.         Shape2.Visible = False
  898. End Select
  899. End Sub
  900. Private Sub Scroll_Change(Index As Integer)
  901. P = Int(Index / 3)
  902. RGBValue(P).Caption = "RGB (" + RTrim$(Str$(Scroll(P * 3).Value)) + " , " + RTrim$(Str$(Scroll(P * 3 + 1).Value)) + " , " + RTrim$(Str$(Scroll(P * 3 + 2).Value)) + " )"
  903. TheColor = RGB(Scroll(P * 3).Value, Scroll(P * 3 + 1).Value, Scroll(P * 3 + 2).Value)
  904. If P = 0 Then FirstColor = TheColor: ForeColorSample.BackColor = TheColor Else SecondColor = TheColor: BackColorSample.BackColor = TheColor
  905. Line2.BorderColor = FirstColor
  906. BoxOptionSample.BorderColor = FirstColor
  907. If BoxOptionInterior(0).Value = True Then BoxOptionSample.BackColor = FirstColor
  908. If BoxOptionInterior(1).Value = True Then BoxOptionSample.BackColor = SecondColor
  909. GradationChanged = True
  910. End Sub
  911. Private Sub Scroll_Scroll(Index As Integer)
  912. P = Int(Index / 3)
  913. RGBValue(P).Caption = "RGB (" + RTrim$(Str$(Scroll(P * 3).Value)) + " , " + RTrim$(Str$(Scroll(P * 3 + 1).Value)) + " , " + RTrim$(Str$(Scroll(P * 3 + 2).Value)) + " )"
  914. TheColor = RGB(Scroll(P * 3).Value, Scroll(P * 3 + 1).Value, Scroll(P * 3 + 2).Value)
  915. If P = 0 Then FirstColor = TheColor: ForeColorSample.BackColor = TheColor Else SecondColor = TheColor: BackColorSample.BackColor = TheColor
  916. Line2.BorderColor = FirstColor
  917. BoxOptionSample.BorderColor = FirstColor
  918. If BoxOptionInterior(0).Value = True Then BoxOptionSample.BackColor = FirstColor
  919. If BoxOptionInterior(1).Value = True Then BoxOptionSample.BackColor = SecondColor
  920. GradationChanged = True
  921. End Sub
  922. Function TakeRGB(Colors As Long, Index As Integer) As Long
  923. IndexColor = Colors
  924. Red = IndexColor - Int(IndexColor / 256) * 256: IndexColor = (IndexColor - Red) / 256
  925. Green = IndexColor - Int(IndexColor / 256) * 256: IndexColor = (IndexColor - Green) / 256
  926. Blue = IndexColor
  927. If Index = 0 Then TakeRGB = Red
  928. If Index = 1 Then TakeRGB = Green
  929. If Index = 2 Then TakeRGB = Blue
  930. End Function
  931. Private Sub SubMenuBlur_Click()
  932. f = 97: f2 = f / 2 - 1
  933. All = (MainPic.ScaleWidth - f) * (MainPic.ScaleHeight - f) / f / f
  934. For i = f2 To MainPic.ScaleWidth - f2 Step f
  935. For j = f2 To MainPic.ScaleHeight - f2 Step f
  936. r = 0: g = 0: b = 0
  937. For k = -f2 To f2 Step f2 / 2: For l = -f2 To f2 Step f2 / 2
  938. r = r + TakeRGB(MainPic.Point(i + k, j + l), 0)
  939. g = g + TakeRGB(MainPic.Point(i + k, j + l), 1)
  940. b = b + TakeRGB(MainPic.Point(i + k, j + l), 2)
  941. Next l, k
  942. MainPic.Line (i - f2, j - f2)-(i + f2, j + f2), RGB(r / 25, g / 25, b / 25), BF
  943. h = h + 1
  944. If h > All Then ProgressBar1.Value = 100 Else ProgressBar1.Value = h / All * 100
  945. Next j
  946. Next i
  947. MsgBox "done!!!"
  948. ProgressBar1.Value = 0
  949. End Sub
  950. Private Sub SubMenuExit_Click()
  951. End Sub
  952. Private Sub SubMenuNew_Click()
  953. MainPic.Cls
  954. End Sub
  955. Private Sub SubMenuOpen_Click()
  956. On Error GoTo 10
  957. CommonDialog1.ShowOpen
  958. MainPic.Picture = LoadPicture(CommonDialog1.filename)
  959. End Sub
  960. 'Private Sub SubMenuSharpen_Click()
  961. 'All = (MainPic.ScaleWidth - 2) * (MainPic.ScaleHeight - 2)
  962. 'For i = 1 To MainPic.ScaleWidth - 2
  963. 'For j = 1 To MainPic.ScaleHeight - 2
  964. 'r = TakeRGB(MainPic.Point(i, j), 0) + 0.5 * (TakeRGB(MainPic.Point(i, j), 0) - TakeRGB(MainPic.Point(i - 1, j - 1), 0))
  965. 'g = TakeRGB(MainPic.Point(i, j), 1) + 0.5 * (TakeRGB(MainPic.Point(i, j), 1) - TakeRGB(MainPic.Point(i - 1, j - 1), 1))
  966. 'b = TakeRGB(MainPic.Point(i, j), 2) + 0.5 * (TakeRGB(MainPic.Point(i, j), 2) - TakeRGB(MainPic.Point(i - 1, j - 1), 2))
  967. 'If r > 255 Then r = 255 Else If r < 0 Then r = 0
  968. 'If g > 255 Then g = 255 Else If g < 0 Then g = 0
  969. 'If b > 255 Then b = 255 Else If b < 0 Then b = 0
  970. 'h = h + 1
  971. 'ProgressBar1.Value = h / All * 100
  972. 'MainPic.PSet (i, j), RGB(r, g, b)
  973. 'Next j, i
  974. 'MsgBox "done!"
  975. 'End Sub
  976. Private Sub Timer1_Timer()
  977. If GradationChanged = False Then Exit Sub
  978. Dim sc1 As Long
  979. Dim sc2 As Long
  980. sc1 = FirstColor
  981. If GradationColor(0).Value = True Then sc2 = SecondColor
  982. If GradationColor(1).Value = True Then sc2 = &HFFFFFF
  983. If GradationColor(2).Value = True Then sc2 = &H0
  984. f1 = TakeRGB(sc2, 0): f2 = TakeRGB(sc2, 1): f3 = TakeRGB(sc2, 2)
  985. v1 = TakeRGB(sc1, 0): v2 = TakeRGB(sc1, 1): v3 = TakeRGB(sc1, 2)
  986. ForStart = 0: forstep = 10
  987. Endpro = IIf(GradationDirection(0).Value = True, Picture1.ScaleWidth, Picture1.ScaleHeight)
  988. For i = ForStart To Endpro Step forstep
  989. D1 = v1 + (f1 - v1) / Endpro * i
  990. D2 = v2 + (f2 - v2) / Endpro * i
  991. D3 = v3 + (f3 - v3) / Endpro * i
  992. If GradationDirection(0).Value = True Then Picture1.Line (i, 0)-(i, Picture1.ScaleHeight), RGB(D1, D2, D3)
  993. If GradationDirection(1).Value = True Then Picture1.Line (0, i)-(Picture1.ScaleWidth, i), RGB(D1, D2, D3)
  994. 10 Next i
  995. GradationChanged = False
  996. End Sub
  997. Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
  998. For i = 1 To 8
  999. If Toolbar1.Buttons(i).Value = tbrPressed Then CurrentChoice = i
  1000. Next i
  1001. Shape1.Visible = False
  1002. Line1.Visible = False
  1003. For i = 0 To 4
  1004. Optionframe(i).Visible = False
  1005. Next i
  1006. Select Case CurrentChoice
  1007.     Case 1 To 2
  1008.         Optionframe(0).Visible = True
  1009.     Case 3
  1010.         Optionframe(2).Visible = True
  1011.     Case 4
  1012.         Optionframe(1).Visible = True
  1013.     Case 5 To 7
  1014.         Optionframe(3).Visible = True
  1015.     Case 8
  1016.         GradationChanged = True
  1017.         Optionframe(4).Visible = True
  1018. End Select
  1019. End Sub
  1020.