Treceți la conținutul principal

visual basic 6 listing program CAD minimalist

VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "ComDlg32.OCX"
Begin VB.Form Form1 
   AutoRedraw      =   -1  'True
   BackColor       =   &H00C0C0C0&
   Caption         =   "DrawCAD"
   ClientHeight    =   10305
   ClientLeft      =   60
   ClientTop       =   630
   ClientWidth     =   15075
   DrawWidth       =   5
   LinkTopic       =   "Form1"
   ScaleHeight     =   10305
   ScaleWidth      =   15075
   Begin VB.CommandButton Command40 
      Caption         =   "XS"
      Height          =   375
      Left            =   720
      TabIndex        =   77
      Top             =   6240
      Width           =   495
   End
   Begin VB.TextBox Text10 
      Height          =   375
      Left            =   11640
      TabIndex        =   74
      Text            =   "500"
      Top             =   840
      Width           =   735
   End
   Begin VB.TextBox Text9 
      Height          =   375
      Left            =   12480
      TabIndex        =   73
      Text            =   "500"
      Top             =   840
      Width           =   735
   End
   Begin VB.ComboBox cboShapes 
      Height          =   315
      Left            =   3840
      TabIndex        =   72
      Top             =   720
      Width           =   2655
   End
   Begin VB.CommandButton Command39 
      Caption         =   "Shape"
      Height          =   375
      Left            =   600
      TabIndex        =   71
      Top             =   5880
      Width           =   615
   End
   Begin VB.CommandButton Command38 
      Caption         =   "Pie"
      Height          =   375
      Left            =   600
      TabIndex        =   70
      Top             =   5520
      Width           =   615
   End
   Begin VB.CheckBox Check1 
      Caption         =   "Check1"
      Height          =   255
      Left            =   1080
      TabIndex        =   69
      Top             =   1200
      Width           =   255
   End
   Begin VB.CommandButton Command37 
      Caption         =   "NotFill"
      Height          =   255
      Left            =   600
      TabIndex        =   68
      Top             =   2040
      Width           =   615
   End
   Begin VB.CommandButton Command36 
      Caption         =   "nGon"
      Height          =   375
      Left            =   0
      TabIndex        =   67
      Top             =   5880
      Width           =   615
   End
   Begin VB.CommandButton Command35 
      Caption         =   "Unghi"
      Height          =   375
      Left            =   0
      TabIndex        =   66
      Top             =   5520
      Width           =   615
   End
   Begin VB.CommandButton Command34 
      Caption         =   "Trapez"
      Height          =   375
      Left            =   600
      TabIndex        =   65
      Top             =   5160
      Width           =   615
   End
   Begin VB.CommandButton Command33 
      Caption         =   "Romb"
      Height          =   375
      Left            =   0
      TabIndex        =   64
      Top             =   5160
      Width           =   615
   End
   Begin VB.CommandButton Command32 
      Caption         =   "10"
      Height          =   255
      Left            =   360
      TabIndex        =   63
      Top             =   6720
      Width           =   375
   End
   Begin VB.CommandButton Command31 
      Caption         =   "8"
      Height          =   255
      Left            =   0
      TabIndex        =   62
      Top             =   6720
      Width           =   375
   End
   Begin VB.CommandButton Command30 
      Caption         =   "7"
      Height          =   255
      Left            =   0
      TabIndex        =   61
      Top             =   6480
      Width           =   375
   End
   Begin VB.CommandButton Command29 
      Caption         =   "6"
      Height          =   255
      Left            =   360
      TabIndex        =   60
      Top             =   6480
      Width           =   375
   End
   Begin VB.CommandButton Command28 
      Caption         =   "5"
      Height          =   255
      Left            =   360
      TabIndex        =   59
      Top             =   6240
      Width           =   375
   End
   Begin VB.CommandButton Command23 
      Caption         =   "3"
      Height          =   255
      Left            =   0
      TabIndex        =   58
      Top             =   6240
      Width           =   375
   End
   Begin VB.ComboBox cboDrawStyle 
      Height          =   315
      Left            =   3840
      TabIndex        =   57
      Top             =   360
      Width           =   2655
   End
   Begin VB.ComboBox cboDrawMode 
      Height          =   315
      Left            =   3840
      TabIndex        =   56
      Top             =   0
      Width           =   2655
   End
   Begin VB.CommandButton Command27 
      Caption         =   "Ar"
      Height          =   375
      Left            =   600
      TabIndex        =   55
      Top             =   1200
      Width           =   375
   End
   Begin VB.CommandButton Command26 
      Caption         =   "SQ"
      Height          =   375
      Left            =   600
      TabIndex        =   54
      Top             =   1560
      Width           =   375
   End
   Begin VB.TextBox txtParts 
      Height          =   375
      Left            =   12480
      TabIndex        =   52
      Text            =   "5"
      Top             =   240
      Width           =   855
   End
   Begin VB.TextBox txtRaza 
      Height          =   375
      Left            =   11640
      TabIndex        =   50
      Text            =   "500"
      Top             =   240
      Width           =   735
   End
   Begin VB.CommandButton Command25 
      Caption         =   "drawCircle"
      Height          =   375
      Left            =   0
      TabIndex        =   49
      Top             =   2760
      Width           =   1215
   End
   Begin VB.PictureBox Picture5 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   6855
      Left            =   10800
      ScaleHeight     =   6825
      ScaleWidth      =   105
      TabIndex        =   48
      Top             =   1800
      Width           =   135
   End
   Begin VB.PictureBox Picture4 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   135
      Left            =   1800
      ScaleHeight     =   105
      ScaleWidth      =   8865
      TabIndex        =   47
      Top             =   8760
      Width           =   8895
   End
   Begin VB.TextBox Text8 
      Height          =   375
      Left            =   10440
      TabIndex        =   44
      Text            =   "0"
      Top             =   240
      Width           =   735
   End
   Begin VB.TextBox Text7 
      Height          =   375
      Left            =   0
      TabIndex        =   43
      Text            =   "debugmodeonly"
      Top             =   6960
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.PictureBox pboxSelPixelColor 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   10680
      ScaleHeight     =   345
      ScaleWidth      =   345
      TabIndex        =   42
      Top             =   720
      Width           =   375
   End
   Begin VB.PictureBox pboxCurrentPixelColor 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   10920
      ScaleHeight     =   345
      ScaleWidth      =   345
      TabIndex        =   41
      Top             =   840
      Width           =   375
   End
   Begin VB.TextBox Text6 
      Height          =   285
      Left            =   7080
      MultiLine       =   -1  'True
      TabIndex        =   40
      Text            =   "Form1.frx":0000
      Top             =   960
      Width           =   3495
   End
   Begin VB.TextBox Text5 
      Height          =   285
      Left            =   7080
      MultiLine       =   -1  'True
      TabIndex        =   39
      Text            =   "Form1.frx":0006
      Top             =   720
      Width           =   3495
   End
   Begin VB.CommandButton Command24 
      Caption         =   "RoundedRect"
      Height          =   375
      Left            =   0
      TabIndex        =   38
      Top             =   9840
      Width           =   1215
   End
   Begin VB.CommandButton Command22 
      Caption         =   "Elipse"
      Height          =   495
      Left            =   0
      TabIndex        =   37
      Top             =   4200
      Width           =   1215
   End
   Begin VB.CommandButton Command21 
      Caption         =   "Polygon"
      Height          =   375
      Left            =   0
      TabIndex        =   36
      Top             =   3840
      Width           =   1215
   End
   Begin VB.CommandButton Command20 
      Caption         =   "Curve"
      Height          =   375
      Left            =   0
      TabIndex        =   35
      Top             =   9480
      Width           =   1215
   End
   Begin VB.CommandButton Command19 
      Caption         =   "Text"
      Height          =   375
      Left            =   0
      TabIndex        =   34
      Top             =   3480
      Width           =   1215
   End
   Begin VB.CommandButton Command18 
      Caption         =   "AirBrush"
      Height          =   375
      Left            =   0
      TabIndex        =   33
      Top             =   9120
      Width           =   1215
   End
   Begin VB.CommandButton Command17 
      Caption         =   "Brush"
      Height          =   375
      Left            =   0
      TabIndex        =   32
      Top             =   7320
      Width           =   1215
   End
   Begin VB.CommandButton Command16 
      Caption         =   "Pencil"
      Height          =   375
      Left            =   0
      TabIndex        =   31
      Top             =   4680
      Width           =   1215
   End
   Begin VB.CommandButton Command15 
      Caption         =   "Magnifier"
      Height          =   375
      Left            =   0
      TabIndex        =   30
      Top             =   7680
      Width           =   1215
   End
   Begin VB.CommandButton Command14 
      Caption         =   "ColorPick"
      Height          =   375
      Left            =   0
      TabIndex        =   29
      Top             =   2400
      Width           =   1215
   End
   Begin VB.CommandButton Command13 
      Caption         =   "Bucket"
      Height          =   375
      Left            =   0
      TabIndex        =   28
      Top             =   8760
      Width           =   1215
   End
   Begin VB.CommandButton Command12 
      Caption         =   "Radiera"
      Height          =   375
      Left            =   0
      TabIndex        =   27
      Top             =   3120
      Width           =   1215
   End
   Begin VB.CommandButton Command11 
      Caption         =   "Select"
      Height          =   375
      Left            =   0
      TabIndex        =   26
      Top             =   8400
      Width           =   1215
   End
   Begin VB.CommandButton Command10 
      Caption         =   "SelectSpreead"
      Height          =   375
      Left            =   0
      TabIndex        =   25
      Top             =   8040
      Width           =   1215
   End
   Begin VB.CommandButton Command9 
      Caption         =   "SQ"
      Height          =   375
      Left            =   600
      TabIndex        =   24
      Top             =   480
      Width           =   375
   End
   Begin VB.CommandButton Command8 
      Caption         =   "go"
      Height          =   375
      Left            =   9960
      TabIndex        =   23
      Top             =   240
      Width           =   375
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   8520
      TabIndex        =   20
      Text            =   "0"
      Top             =   240
      Width           =   615
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   9240
      TabIndex        =   19
      Text            =   "0"
      Top             =   240
      Width           =   615
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   7800
      TabIndex        =   16
      Text            =   "0"
      Top             =   240
      Width           =   615
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   7080
      TabIndex        =   15
      Text            =   "0"
      Top             =   240
      Width           =   615
   End
   Begin VB.CommandButton Command7 
      Caption         =   "G"
      Height          =   375
      Left            =   2520
      TabIndex        =   14
      Top             =   840
      Width           =   375
   End
   Begin VB.CommandButton Command6 
      Caption         =   "X"
      Height          =   375
      Left            =   2160
      TabIndex        =   13
      Top             =   840
      Width           =   375
   End
   Begin VB.CommandButton Command5 
      Caption         =   "Ce"
      Height          =   375
      Left            =   120
      TabIndex        =   12
      Top             =   1920
      Width           =   375
   End
   Begin VB.CommandButton Command4 
      Caption         =   "Sq"
      Height          =   375
      Left            =   120
      TabIndex        =   11
      Top             =   1560
      Width           =   375
   End
   Begin VB.CommandButton Command3 
      Caption         =   "Ln"
      Height          =   375
      Left            =   120
      TabIndex        =   10
      Top             =   1200
      Width           =   375
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Pc"
      Height          =   375
      Left            =   120
      TabIndex        =   9
      Top             =   840
      Width           =   375
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Pe"
      Height          =   375
      Left            =   120
      TabIndex        =   8
      Top             =   480
      Width           =   375
   End
   Begin VB.TextBox txtDimC 
      Height          =   285
      Left            =   2760
      TabIndex        =   6
      Text            =   "100"
      Top             =   240
      Width           =   855
   End
   Begin VB.ComboBox Combo1 
      Height          =   315
      ItemData        =   "Form1.frx":000C
      Left            =   1200
      List            =   "Form1.frx":0040
      TabIndex        =   5
      Text            =   "5"
      Top             =   480
      Width           =   855
   End
   Begin VB.PictureBox Picture3 
      Appearance      =   0  'Flat
      BackColor       =   &H00000000&
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   2160
      ScaleHeight     =   345
      ScaleWidth      =   345
      TabIndex        =   4
      Top             =   120
      Width           =   375
   End
   Begin VB.PictureBox Picture2 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   2280
      ScaleHeight     =   345
      ScaleWidth      =   345
      TabIndex        =   3
      Top             =   360
      Width           =   375
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   3000
      Top             =   720
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.TextBox txtWidthDraw 
      Height          =   285
      Left            =   1200
      TabIndex        =   1
      Text            =   "5"
      Top             =   120
      Width           =   855
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   6855
      Left            =   1800
      MousePointer    =   2  'Cross
      ScaleHeight     =   6855
      ScaleWidth      =   8895
      TabIndex        =   0
      Top             =   1800
      Width           =   8895
   End
   Begin VB.Label Label11 
      Caption         =   "Height:"
      Height          =   255
      Left            =   12360
      TabIndex        =   76
      Top             =   600
      Width           =   615
   End
   Begin VB.Label Label10 
      Caption         =   "Width:"
      Height          =   255
      Left            =   11280
      TabIndex        =   75
      Top             =   600
      Width           =   495
   End
   Begin VB.Label Label9 
      Caption         =   "Parts:"
      Height          =   255
      Left            =   12360
      TabIndex        =   53
      Top             =   0
      Width           =   615
   End
   Begin VB.Label Label8 
      Caption         =   "Raza:"
      Height          =   255
      Left            =   11280
      TabIndex        =   51
      Top             =   0
      Width           =   735
   End
   Begin VB.Label lblDummy 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "Label8"
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   600
      TabIndex        =   46
      Top             =   960
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Label Label7 
      Caption         =   "diff"
      Height          =   255
      Left            =   10320
      TabIndex        =   45
      Top             =   0
      Width           =   735
   End
   Begin VB.Shape DummyShapeRSquare 
      Height          =   255
      Left            =   1800
      Shape           =   5  'Rounded Square
      Top             =   840
      Visible         =   0   'False
      Width           =   255
   End
   Begin VB.Shape DummyShapeRRect 
      Height          =   255
      Left            =   1680
      Shape           =   4  'Rounded Rectangle
      Top             =   840
      Visible         =   0   'False
      Width           =   255
   End
   Begin VB.Shape DummyShapeSquare 
      Height          =   255
      Left            =   1560
      Shape           =   1  'Square
      Top             =   840
      Visible         =   0   'False
      Width           =   255
   End
   Begin VB.Shape DummyShapeOval 
      Height          =   375
      Left            =   1320
      Shape           =   2  'Oval
      Top             =   840
      Visible         =   0   'False
      Width           =   255
   End
   Begin VB.Shape DummyShapeCircle 
      Height          =   255
      Left            =   1200
      Shape           =   3  'Circle
      Top             =   840
      Visible         =   0   'False
      Width           =   255
   End
   Begin VB.Shape DummyShape 
      Height          =   255
      Left            =   1080
      Top             =   840
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Line LineDummy 
      Visible         =   0   'False
      X1              =   1440
      X2              =   1680
      Y1              =   840
      Y2              =   1080
   End
   Begin VB.Line Line4 
      X1              =   1440
      X2              =   1440
      Y1              =   10200
      Y2              =   1440
   End
   Begin VB.Line Line3 
      X1              =   1440
      X2              =   15000
      Y1              =   1440
      Y2              =   1440
   End
   Begin VB.Line Line2 
      X1              =   1680
      X2              =   1200
      Y1              =   1800
      Y2              =   1800
   End
   Begin VB.Line Line1 
      X1              =   1800
      X2              =   1800
      Y1              =   1680
      Y2              =   1200
   End
   Begin VB.Label Label6 
      Caption         =   "x2: "
      Height          =   255
      Left            =   8400
      TabIndex        =   22
      Top             =   0
      Width           =   495
   End
   Begin VB.Label Label5 
      Caption         =   "y2: "
      Height          =   255
      Left            =   9120
      TabIndex        =   21
      Top             =   0
      Width           =   495
   End
   Begin VB.Label Label4 
      Caption         =   "y1: "
      Height          =   255
      Left            =   7680
      TabIndex        =   18
      Top             =   0
      Width           =   495
   End
   Begin VB.Label Label3 
      Caption         =   "x1: "
      Height          =   255
      Left            =   6960
      TabIndex        =   17
      Top             =   0
      Width           =   495
   End
   Begin VB.Label Label2 
      Caption         =   "Dimension: "
      Height          =   255
      Left            =   2640
      TabIndex        =   7
      Top             =   0
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "Width: "
      Height          =   255
      Left            =   480
      TabIndex        =   2
      Top             =   120
      Width           =   615
   End
   Begin VB.Shape Shape1 
      FillColor       =   &H00E0E0E0&
      FillStyle       =   0  'Solid
      Height          =   8415
      Left            =   1320
      Top             =   1800
      Width           =   255
   End
   Begin VB.Shape Shape2 
      FillColor       =   &H00E0E0E0&
      FillStyle       =   0  'Solid
      Height          =   255
      Left            =   1800
      Top             =   1320
      Width           =   13215
   End
   Begin VB.Menu File 
      Caption         =   "File"
      Begin VB.Menu New 
         Caption         =   "New"
      End
      Begin VB.Menu Open 
         Caption         =   "Open"
      End
      Begin VB.Menu Save 
         Caption         =   "Save"
      End
      Begin VB.Menu SaveAs 
         Caption         =   "SaveAs.."
      End
      Begin VB.Menu Print 
         Caption         =   "Print"
      End
      Begin VB.Menu Send 
         Caption         =   "Send"
      End
      Begin VB.Menu Set 
         Caption         =   "Set"
      End
      Begin VB.Menu Exit 
         Caption         =   "Exit"
      End
   End
   Begin VB.Menu Edit 
      Caption         =   "Edit"
      Begin VB.Menu Redo 
         Caption         =   "Redo"
      End
      Begin VB.Menu Undo 
         Caption         =   "Undo"
      End
      Begin VB.Menu Cut 
         Caption         =   "Cut"
      End
      Begin VB.Menu copy 
         Caption         =   "Copy"
      End
      Begin VB.Menu Paste 
         Caption         =   "Paste"
      End
      Begin VB.Menu ClearSelect 
         Caption         =   "ClearSelect"
      End
      Begin VB.Menu SelectAll 
         Caption         =   "SelectAll"
      End
      Begin VB.Menu CopyTo 
         Caption         =   "CopyTo"
      End
      Begin VB.Menu PasteFrom 
         Caption         =   "PasteFrom"
      End
      Begin VB.Menu clrscr 
         Caption         =   "ClearScreen"
         Shortcut        =   ^X
      End
   End
   Begin VB.Menu View 
      Caption         =   "View"
      Begin VB.Menu ToolBox 
         Caption         =   "ToolBox"
      End
      Begin VB.Menu ColorBox 
         Caption         =   "ColorBox"
      End
      Begin VB.Menu TextBox 
         Caption         =   "TextBox"
      End
      Begin VB.Menu StatusBox 
         Caption         =   "StatusBox"
      End
      Begin VB.Menu ViewTool 
         Caption         =   "ViewTool"
      End
      Begin VB.Menu Zoom 
         Caption         =   "Zoom"
      End
      Begin VB.Menu setGrid 
         Caption         =   "setGrid"
      End
      Begin VB.Menu Login 
         Caption         =   "Login"
      End
      Begin VB.Menu Options 
         Caption         =   "Options"
      End
      Begin VB.Menu Browser 
         Caption         =   "Bowser"
      End
      Begin VB.Menu Tip 
         Caption         =   "Tip"
      End
      Begin VB.Menu ShowGrid 
         Caption         =   "ShowGrid"
         Shortcut        =   ^G
      End
   End
   Begin VB.Menu Image 
      Caption         =   "Image"
      Begin VB.Menu Flip 
         Caption         =   "Flip"
      End
      Begin VB.Menu Rotate 
         Caption         =   "Rotate"
      End
      Begin VB.Menu Stretch 
         Caption         =   "Stretch"
      End
      Begin VB.Menu Skew 
         Caption         =   "Skew"
      End
      Begin VB.Menu InvertColors 
         Caption         =   "InvertColors"
      End
      Begin VB.Menu DrawOpaque 
         Caption         =   "DrawOpaque"
      End
      Begin VB.Menu Attributes 
         Caption         =   "Attributes"
      End
      Begin VB.Menu ClearImage 
         Caption         =   "ClearImage"
      End
   End
   Begin VB.Menu Insert 
      Caption         =   "Insert"
      Begin VB.Menu Pen2D 
         Caption         =   "Pen2D"
      End
      Begin VB.Menu Point2D 
         Caption         =   "Point2D"
         Shortcut        =   ^P
      End
      Begin VB.Menu Line2D 
         Caption         =   "Line2D"
         Shortcut        =   ^L
      End
      Begin VB.Menu Square2D 
         Caption         =   "Square2D"
         Shortcut        =   ^S
      End
      Begin VB.Menu Circle2D 
         Caption         =   "Circle2D"
         Shortcut        =   ^C
      End
      Begin VB.Menu SolidRect 
         Caption         =   "SoldRect"
         Shortcut        =   ^V
      End
      Begin VB.Menu SelectSpread 
         Caption         =   "SelectSpread"
      End
      Begin VB.Menu Select 
         Caption         =   "Select"
      End
      Begin VB.Menu Radiera 
         Caption         =   "Radiera"
      End
      Begin VB.Menu Bucket 
         Caption         =   "Bucket"
      End
      Begin VB.Menu ColorPick 
         Caption         =   "ColorPick"
      End
      Begin VB.Menu Magnifier 
         Caption         =   "Magnifier"
      End
      Begin VB.Menu Pencil 
         Caption         =   "Pencil"
      End
      Begin VB.Menu Brush 
         Caption         =   "Brush"
      End
      Begin VB.Menu AirBrush 
         Caption         =   "AirBrush"
      End
      Begin VB.Menu Text 
         Caption         =   "Text"
      End
      Begin VB.Menu Line 
         Caption         =   "Line"
      End
      Begin VB.Menu Curve 
         Caption         =   "Curve"
      End
      Begin VB.Menu Polygon 
         Caption         =   "Polygon"
      End
      Begin VB.Menu Rectangle 
         Caption         =   "Rectangle"
      End
      Begin VB.Menu Elipse 
         Caption         =   "Elipse"
      End
      Begin VB.Menu RoundRectangle 
         Caption         =   "RoundRectangle"
      End
   End
   Begin VB.Menu Action 
      Caption         =   "Action"
      Begin VB.Menu Go 
         Caption         =   "Go"
         Shortcut        =   ^A
      End
   End
   Begin VB.Menu Color 
      Caption         =   "Color"
      Begin VB.Menu NewColor 
         Caption         =   "NewColor"
      End
      Begin VB.Menu EditColors 
         Caption         =   "EditColors"
      End
   End
   Begin VB.Menu Help 
      Caption         =   "Help"
      Begin VB.Menu HelpDraw 
         Caption         =   "HelpDraw"
      End
      Begin VB.Menu Splash 
         Caption         =   "Splash"
      End
      Begin VB.Menu About 
         Caption         =   "About"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mdown, dx, dy, cx, cy, rx, ry As Integer
Dim colorc, colorb
Dim widthc
Dim dimc
Dim toolc
Dim mtdown
'toolc ce unealta este selectata
Dim gridactiv
Dim lineDraw, SQUAREDRAW, DSX, DSY, circledraw, elipsedraw
Dim drawCircleMode, drawElipseMode
Dim debugMode
Dim firstPointPolygon
Dim dimdiff, dimdiffx, dimdiffy
Dim textPicture
Dim toolb
Dim razaa, ratiaa
Dim leftp1, topp1, pic4selected, pic5selected
Dim drawmodec, drawstylec
Dim ShapeNo
Private ngrid As Integer


Public Sub DrawPiePiece(colorg, fStart, fEnd)

       
        Const CircleEnd As Double = -2 * 3.14159265359
        Dim dStart As Double
        Dim dEnd As Double
        Me.Picture1.FillColor = colorg
        Me.Picture1.FillStyle = 0
        dStart = fStart * (CircleEnd / 100)
        dEnd = fEnd * (CircleEnd / 100)
        Me.Picture1.Circle (dx, dy), 60, , dStart, dEnd
        
      End Sub

      Private Sub DrawPieChart()

        Me.Picture1.ScaleMode = vbPixels
        Call DrawPiePiece(QBColor(1), 0.001, 36)
        Call DrawPiePiece(QBColor(2), 36, 55)
        Call DrawPiePiece(QBColor(3), 55, 75)
        Call DrawPiePiece(QBColor(4), 75, 99.999)
       
      End Sub
Public Property Let MyVar(ByVal grid_val As Integer)
   ngrid = grid_val
   gridactive = 1
 'error delete image  Call gridTo(ngrid)
End Property

Private Sub penTo()

    Me.Picture1.Line (rx, ry)-(cx, cy)
End Sub



Private Sub About_Click()

frmAbout.Show
End Sub

Private Sub Browser_Click()

frmBrowser.Show
End Sub

Private Sub cboDrawMode_Click()

If (Me.cboDrawMode.ListIndex > 0) Then
drawmodec = Me.Picture1.DrawMode
debugMode = 1
Me.Text7.Visible = True
Me.Text7.Text = drawmodec & " : " & drawstylec
cboDrawMode.Text = Me.cboDrawMode.List(Me.cboDrawMode.ListIndex)
drawmodec = Me.cboDrawMode.ListIndex
Me.Picture1.DrawMode = drawmodec
End If
End Sub

Private Sub cboDrawStyle_Click()

debugMode = 1
Me.Text7.Visible = True
Me.Text7.Text = drawmodec & " : " & drawstylec
drawstylec = Me.Picture1.DrawStyle
cboDrawStyle.Text = Me.cboDrawStyle.List(Me.cboDrawStyle.ListIndex)
drawstylec = Me.cboDrawStyle.ListIndex
Me.Picture1.DrawStyle = drawstylec
End Sub

Private Sub cboShapes_Change()

'If (Me.cboShapes.ListIndex > 0) Then
'drawmodec = Me.Picture1.DrawMode
'debugMode = 1
'Me.Text7.Visible = True
'Me.Text7.Text = drawmodec & " : " & drawstylec
'cboDrawMode.Text = Me.cboDrawMode.List(Me.cboDrawMode.ListIndex)
'drawmodec = Me.cboDrawMode.ListIndex
'Me.Picture1.DrawMode = drawmodec
'End If
End Sub

Private Sub Check1_Click()

If Me.Check1.Value = 0 Then
    Me.Picture1.FillStyle = 1
End If
If Me.Check1.Value = 1 Then
    Me.Picture1.FillStyle = 0
End If

End Sub


Private Sub Circle2D_Click()

Call circleTo(dx, dy, dimc)
End Sub

Private Sub clrscr_Click()

a = MsgBox("Clear Image !", vbYesNoCancel, "Erase image")
If a = vbYes Then
Call clrScrTo
gridactiv = False
Picture1.Picture = LoadPicture()
ElseIf a = vbNo Then
'
Else
'
End If
End Sub



Private Sub ColorBox_Click()

Me.CommonDialog1.ShowColor
colorc = Me.CommonDialog1.Color
Me.Picture1.ForeColor = colorc
Me.Picture3.BackColor = colorc
End Sub

Private Sub Combo1_Click()

Combo1.Text = Me.Combo1.List(Me.Combo1.ListIndex)
widthc = Combo1.Text
Me.txtWidthDraw.Text = Combo1.Text
Me.Picture1.DrawWidth = widthc
End Sub

Private Sub gridTo(ngrid)

For i = 0 To 50
    For J = 0 To 50
        Call pointTo(i * ngrid, J * ngrid)
      'Call lineTo(i + 1, j - 1, i - 1, j + 1)
      
    Next J
Next i
End Sub



Private Sub Command1_Click()

toolc = "Pen"
toolb = ""
End Sub

Private Sub Command12_Click()

toolc = "radiera"
toolb = ""
End Sub

Private Sub Command14_Click()

toolc = "PickColor"
End Sub

Private Sub Command16_Click()

toolc = "Pen"
toolb = ""
End Sub

Private Sub Command19_Click()

toolb = ""
 a = InputBox("TEXT", "INPUT TEXT")
 If a <> "" Then
 textPicture = a
 End If

lblDummy.Caption = textPicture
toolc = "TEXT"
lblDummy.Width = Len(textPicture) * 100
End Sub

Private Sub Command2_Click()

toolc = "Point"
toolb = ""
End Sub

Private Sub Command21_Click()

firstPointPolygon = 0
toolc = "polygon"
toolb = ""

End Sub


Private Sub Command22_Click()

toolb = ""
toolc = "Elipse"
End Sub


Private Sub drawCircle2D(px, py)

Dim radius As Double
 Dim bucle As Long
 Dim fx As Double
 Dim fy As Double

 radius = Val(Me.txtRaza)

 'Picture1.Cls

 For bucle = 1 To radius

 fx = Sin(bucle) * radius
 fy = Cos(bucle) * radius
     
Picture1.PSet (((px) + (fx + radius)) - radius, ((fy + radius) + py) - radius)

 Next bucle


End Sub


Private Sub Command23_Click()

toolb = ""
End Sub

Private Sub Command25_Click()

toolc = "DrawCircleX"
toolb = ""
End Sub

Private Sub Command26_Click()

toolc = "Square"
toolb = "FilledSquare"
End Sub
Private Sub filledCircleDraw(fx, fy)

Const PI = 3.14159265

'will generate errors
  Me.Picture1.FillColor = colorc
    If Me.Check1.Value = 0 Then
    Me.Picture1.FillStyle = 0
        End If
    If Me.Check1.Value = 1 Then
    Me.Picture1.FillStyle = 1
    End If
 Me.Picture1.Circle (fx, fy), Val(Me.txtRaza)
  ' Me.Picture1.Circle (dx, dy), Val(Me.txtRaza), , �PI / 2, �PI / 3
'degree to radianb = degrees * Pi/180.

End Sub


Private Sub Command27_Click()

 toolc = "filledCircle"
 toolb = ""
End Sub

Private Sub Command3_Click()

toolc = "Line"
toolb = ""
End Sub

Private Sub Command37_Click()

toolb = ""
Me.Picture1.FillStyle = 1
End Sub

Private Sub Command38_Click()

toolc = "Pie"
End Sub

Private Sub Command39_Click()

toolc = "ShapeAdd"
End Sub

Private Sub Command4_Click()

toolc = "Square"
toolb = ""
'a = MsgBox("Error", vbCritical, "Filled/Unfilled not functional!")


End Sub


Private Sub Command40_Click()


For xs = 1 To ShapeNo - 1

On Error Resume Next
   Controls.Remove "myShape" & xs
    
    
Next xs
End Sub

Private Sub Command5_Click()

toolb = ""
toolc = "Circle"
End Sub

Private Sub Command6_Click()

a = MsgBox("Clear Image !", vbYesNoCancel, "Erase image")
If a = vbYes Then
Call clrScrTo
gridactiv = False
Picture1.Picture = LoadPicture()
ElseIf a = vbNo Then
'
Else
'
End If
End Sub

Private Sub Command7_Click()

Me.Picture1.ForeColor = &H80000012
Me.Picture3.BackColor = colorc
Dim prevdim
prevdim = Me.Picture1.DrawWidth
If gridactiv = False Then
Me.Picture1.DrawWidth = 1
    Call gridTo(ngrid)
    gridactiv = True
End If
Me.Picture1.DrawWidth = prevdim
End Sub

Private Sub Command8_Click()

Call CMD8
End Sub
Private Sub CMD8()
Dim xx, yy, xxx, yyy
xx = Me.Text1.Text
xxx = Me.Text3.Text
yy = Me.Text2.Text
yyy = Me.Text4.Text
If toolc = "Pen" Then
        Call penTo
        ElseIf toolc = "Point" Then
        Call pointTo(xx, yy)
        ElseIf toolc = "Circle" Then
        Call circleTo(xx, yy, dimc)
        ElseIf toolc = "Line" Then
        Call lineTo(xx, yy, xxx, yyy)
        ElseIf toolc = "Square" Then
        Call squareTo(xx, yy, dimc)
        End If
'de complectat

End Sub



Private Sub Command9_Click()

toolc = "FilledSquare"

End Sub


Private Sub EditColors_Click()

Me.CommonDialog1.ShowColor
colorc = Me.CommonDialog1.Color
Me.Picture1.ForeColor = colorc
End Sub

Private Sub Exit_Click()

da = MsgBox("Exit Program without saving !", vbYesNoCancel, "Close Program")
If (da = vbYes) Then
    End
End If

End Sub


Private Sub Form_Load()

ShapeNo = 1
cboShapes.AddItem "Rectangle", 0
cboShapes.AddItem "Squere", 1
cboShapes.AddItem "Oval", 2
cboShapes.AddItem "Circle", 3
cboShapes.AddItem "RoundRectangle", 4
cboShapes.AddItem "RoundSquare", 5

cboDrawStyle.AddItem "VbSolid 0", 0

cboDrawStyle.AddItem "VbDash 1", 1
cboDrawStyle.AddItem "VbDot 2", 2
cboDrawStyle.AddItem "VbDashDot 3", 3
cboDrawStyle.AddItem "VbDashDotDot 4", 4
cboDrawStyle.AddItem "VbInvisible 5 ", 5
cboDrawStyle.AddItem "VbInsideSolid 6", 6

cboDrawMode.AddItem "N/A", 0

cboDrawMode.AddItem "VbBlackness", 1
cboDrawMode.AddItem "VbNotMergePen", 2
cboDrawMode.AddItem "VbMaskNotPen", 3
cboDrawMode.AddItem "VbNotCopyPen", 4
cboDrawMode.AddItem "VbMaskPenNot", 5
cboDrawMode.AddItem "VbInvert", 6
cboDrawMode.AddItem "VbXorPen", 7
cboDrawMode.AddItem "VbNotMaskPen", 8
cboDrawMode.AddItem "VbMaskPen", 9
cboDrawMode.AddItem "VbNotXorPen", 10
cboDrawMode.AddItem "VbNop 11", 11
cboDrawMode.AddItem "VbMergeNotPen 12", 12
cboDrawMode.AddItem "VbCopyPen 13", 13
cboDrawMode.AddItem "VbMergePenNot 14", 14
cboDrawMode.AddItem "VbMergePen 15", 15
cboDrawMode.AddItem "VbWhiteness 16", 16

'set the picture1.width and height

leftp1 = Me.Picture1.Left
topp1 = Me.Picture1.Top
pic4selected = 0
pic5selected = 0
toolc = ""
toolb = ""
debugMode = 1  ' for debugging mode
mtdown = 0
firstPointPolygon = 0
lineDraw = False
SQUAREDRAW = False
circledraw = False
elipsedraw = False
gridactiv = True
drawcirclenormal = True
drawCircleMode = 0
drawElipseMode = 0
'dimdiff = dimdiffx = dimdiffy = 1
ngrid = 500
cx = cy = 100
dimc = Me.txtDimC.Text
Call gridTo(ngrid)

Call squareTo(150, 150, 100)


Call lineTo(50, 50, 100, 100)

Call lineTo(100, 50, 50, 100)
Call circleTo(75, 75, 5)

End Sub

Private Sub elipseTo(aX, aY, adime, aratio)

' Draw solid ellipse.

 '   Me.Picture1.FillStyle = 0
  '  Me.Picture1.Circle (X, Y), dime, , , , 3
        ' Draw empty ellipse.
    Me.Picture1.FillStyle = 1
   Me.Picture1.Circle (aX, aY), adime, , , , aratio
   
End Sub

Private Sub circleTo(X, Y, dime)

If dime > 0 Then

Me.Picture1.Circle (X, Y), dime, colorc

'RGB(Rnd * 255, Rnd * 255, Rnd * 255)
End If
End Sub



Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

If pic4selected = 1 Then
pic4selected = 2
End If

If pic5selected = 1 Then

pic5selected = 2
End If


End Sub


Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

If pic4selected = 2 Then
    Picture4.Top = Y
    Me.Picture1.Height = Picture4.Top - topp1 - 25
    Me.Picture5.Height = Me.Picture4.Top - 25 - topp1
End If
If pic5selected = 2 Then
    Picture5.Left = X
    Me.Picture1.Width = Picture5.Left - leftp1 - 25
    Me.Picture4.Width = Me.Picture5.Left - 25 - leftp1
End If
End Sub

Private Sub Form_Unload(Cancel As Integer)

da = MsgBox("Exit Program without saving !", vbYesNoCancel, "Close Program")
If (da = vbYes) Then
    End
End If
If (da = vbNo) Or (da = vbCancel) Then
    Cancel = 1
    Exit Sub
    
End If


End Sub


Private Sub Picture4_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

pic4selected = 0
End Sub


Private Sub Picture5_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

'
pic5selected = 0
End Sub


Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)


pic5selected = 0

pic4selected = 0
Me.Picture4.BackColor = &HFFFFFF
Me.Picture5.BackColor = &HFFFFFF
End Sub

Private Sub Go_Click()

Call CMD8
End Sub



Private Sub Line2D_Click()

    Call lineTo(dx, dy, rx, ry)
End Sub

Private Sub Login_Click()

frmLogin.Show
End Sub

Private Sub NewColor_Click()

Form3.Show
End Sub

Private Sub Open_Click()

Dim namefile As String
Me.CommonDialog1.ShowOpen
Me.CommonDialog1.Filter = "*.bmp"
If Me.CommonDialog1.FileName <> "" Then
namefile = Me.CommonDialog1.FileName
On Error Resume Next
Me.Picture1.Picture = LoadPicture(namefile) ' open picture file.

Picture1.Picture = Picture1.Image


End If

End Sub

Private Sub Options_Click()

frmOptions.Show
End Sub

Private Sub Picture1_KeyDown(KeyCode As Integer, Shift As Integer)

'orice tasta este apasata
    If toolc = "polygon" Then
        toolc = ""
        Me.LineDummy.Visible = False
        
        End If
    If toolc = Text Then
        Picture1.CurrentX = X
        Picture1.CurrentY = Y
        Picture1.Print textPicture
    End If
    If mtdown = 1 Then
        If toolc = "TEXT" Then
        lblDummy.Visible = True
        Picture1.Print textPicture

        End If

        End If
End Sub

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)


Me.Text1.Text = X

Me.Text2.Text = Y
mdown = 1
dx = X
dy = Y
mtdown = 1

If toolc = "PickColor" Then

    colorc = Me.Picture1.Point(dx, dy)
    Me.Picture3.BackColor = colorc
End If

If toolc = "TEXT" Then


    Picture1.CurrentX = dx

    Picture1.CurrentY = dy
   ' Picture1.FontName = .cboFontName.List(.cboFontName.ListIndex)
 'Picture1.FontBold = .txt1Bold
 'Picture1.FontItalic = .txt1Italic
 'Picture1.FontUnderline = .txt1Underline
 'Picture1.FontSize = .txt1FontSize
 'now set the print position for the text and print it
 'Picture1.CurrentY = Val(.txtVert)
 'Picture1.CurrentX = Val(.txtHorz)
 'Picture1.Print .Text1

    Picture1.Print textPicture
End If


If toolc = "Pen" Then

        Call penTo
        ElseIf toolc = "Point" Then
        Call pointTo(X, Y)
        ElseIf toolc = "Circle" Then
                'Call circleTo(x, y, dimc)
        ElseIf toolc = "Elipse" Then
                'Call circleTo(x, y, dimc)
        ElseIf toolc = "Line" Then
            Call lineTo(X, Y, dx, dy)
        ElseIf toolc = "Square" Then
                'Call squareTo(X, Y, dimc)
        ElseIf toolc = "FilledSquare" Then
            Call solidsquareTo(dx, dy, dimc)
        ElseIf toolc = "DrawCircleX" Then
                Call drawCircle2D(X, Y)
        ElseIf toolc = "filledCircle" Then
                Call filledCircleDraw(dx, dy)
        ElseIf toolc = "polygon" Then
            If firstPointPolygon = 1 Then
                Me.Picture1.Line -(X, Y)
            Else
             Me.Picture1.Line (dx, dy)-(dx, dy)
             
                firstPointPolygon = 1
               
            End If
        ElseIf toolc = "radiera" Then
        Call pointTo(X, Y)
        End If
        
Call showHexandRGB(dx, dy, Me.Text5)
        Me.pboxSelPixelColor.BackColor = Me.Picture1.Point(dx, dy)
        
'Me.Picture4.Picture = Me.Picture1.Image
End Sub


Private Sub dummyelipse(X, Y)

Me.DummyShapeOval.Visible = True
Set Me.DummyShapeOval.Container = Me.Picture1



elipsedraw = True

If (X > dx) Then
    If (Y > dy) Then
        drawElipseMode = 1
            

            

            Me.DummyShapeOval.Left = dx
            Me.DummyShapeOval.Top = dy
                
                dimdiffx = X - dx
                    Me.DummyShapeOval.Width = dimdiffx
                dimdiffy = Y - dy
                    Me.DummyShapeOval.Height = dimdiffy
               
                
    End If
    If (Y < dy) Then
       drawElipseMode = 2

            

           
            Me.DummyShapeOval.Left = dx
            Me.DummyShapeOval.Top = Y

                

                   dimdiffx = X - dx
                    Me.DummyShapeOval.Width = dimdiffx
                dimdiffy = Abs(Y - dy)
                    Me.DummyShapeOval.Height = dimdiffy
               
    End If
End If

If (X < dx) Then

    If (Y < dy) Then
        drawElipseMode = 3
       
            Me.DummyShapeOval.Left = X
            Me.DummyShapeOval.Top = Y

            


                

                     dimdiffx = Abs(dx - X)
                    Me.DummyShapeOval.Width = dimdiffx
                dimdiffy = Abs(Y - dy)
                    Me.DummyShapeOval.Height = dimdiffy
                
    End If
    If (Y > dy) Then
        drawElipseMode = 4
       
            Me.DummyShapeOval.Left = X
            Me.DummyShapeOval.Top = dy

            


               

                     dimdiffx = Abs(dx - X)
                    Me.DummyShapeOval.Width = dimdiffx
                dimdiffy = Abs(Y - dy)
                    Me.DummyShapeOval.Height = dimdiffy
                
    End If
    
End If

If debugMode = 1 Then

Me.Text7.Visible = True
Me.Text7.Text = drawElipseMode & ":" & dimdiff & ":" & dimdiffx & ":" & dimdiffy
End If


'add existind shape or control to a picture1 type control

'Me.ncircle.Visible = True
'Set Me.ncircle.Container = Me.Picture1
'Me.ncircle.Left = X
'Me.ncircle.Top = Y
'Me.ncircle.Width = dimdiff
'ncircle.Height = dimdiff



End Sub


Private Sub dummycircle(X, Y)

Me.DummyShapeCircle.Visible = True
Set Me.DummyShapeCircle.Container = Me.Picture1



circledraw = True

If (X > dx) Then
    If (Y > dy) Then
        drawCircleMode = 1
            

            dimdiff = X - dx

            Me.DummyShapeCircle.Left = dx
            Me.DummyShapeCircle.Top = dy
                If dimdiff > 0 Then
                    Me.DummyShapeCircle.Width = dimdiff
                    Me.DummyShapeCircle.Height = dimdiff
                End If
                
    End If
    If (Y < dy) Then
       drawCircleMode = 2

            

            dimdiff = X - dx
            Me.DummyShapeCircle.Left = dx
            Me.DummyShapeCircle.Top = Y

                If dimdiff > 0 Then

                    Me.DummyShapeCircle.Width = dimdiff
                    Me.DummyShapeCircle.Height = dimdiff
                End If
    End If
End If

If (X < dx) Then

    If (Y < dy) Then
        drawCircleMode = 3
        dimdiff = dx - X
            Me.DummyShapeCircle.Left = X
            Me.DummyShapeCircle.Top = Y

            


                If dimdiff > 0 Then

                    Me.DummyShapeCircle.Width = dimdiff
                    Me.DummyShapeCircle.Height = dimdiff
                End If
    End If
    If (Y > dy) Then
        drawCircleMode = 4
        dimdiff = dx - X
            Me.DummyShapeCircle.Left = X
            Me.DummyShapeCircle.Top = dy

            


                If dimdiff > 0 Then

                    Me.DummyShapeCircle.Width = dimdiff
                    Me.DummyShapeCircle.Height = dimdiff
                End If
    End If
    
End If

If debugMode = 1 Then

Me.Text7.Visible = True
Me.Text7.Text = drawCircleMode
End If


'add existind shape or control to a picture1 type control

'Me.ncircle.Visible = True
'Set Me.ncircle.Container = Me.Picture1
'Me.ncircle.Left = X
'Me.ncircle.Top = Y
'Me.ncircle.Width = dimdiff
'ncircle.Height = dimdiff



End Sub


Private Sub dummycirclex(X, Y)

Me.DummyShapeCircle.Visible = True
Set Me.DummyShapeCircle.Container = Me.Picture1

Me.DummyShapeCircle.Width = Val(Me.txtRaza) * 2

Me.DummyShapeCircle.Height = Val(Me.txtRaza) * 2
Me.DummyShapeCircle.Left = X - Me.DummyShapeCircle.Width / 2
Me.DummyShapeCircle.Top = Y - Me.DummyShapeCircle.Height / 2


End Sub


Private Sub DummyPolygoneLine(X, Y)



Me.LineDummy.Visible = True

Set Me.LineDummy.Container = Me.Picture1
Me.LineDummy.X1 = dx
Me.LineDummy.Y1 = dy
Me.LineDummy.X2 = X
Me.LineDummy.Y2 = Y

'lineDraw = True


End Sub


Private Sub DUMMYLINE(X, Y)

Me.LineDummy.Visible = True
Set Me.LineDummy.Container = Me.Picture1
Me.LineDummy.X1 = dx
Me.LineDummy.Y1 = dy
Me.LineDummy.X2 = X
Me.LineDummy.Y2 = Y

lineDraw = True


End Sub


Private Sub DUMMYSQUARE(X, Y)

Me.DummyShape.Visible = True
Set Me.DummyShape.Container = Me.Picture1


DSX = X - dx

DSY = Y - dy

If DSX > 0 Then

Me.DummyShape.Left = dx
Me.DummyShape.Width = DSX
End If
If DSY > 0 Then
Me.DummyShape.Top = dy
Me.DummyShape.Height = DSY
End If

If DSX < 0 Then

Me.DummyShape.Left = X
Me.DummyShape.Width = dx - X
End If
If DSY < 0 Then
Me.DummyShape.Top = Y
Me.DummyShape.Height = dy - Y
End If



SQUAREDRAW = True


End Sub


Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

rx = X
ry = Y
If toolc = "polygon" Then
        If firstPointPolygon = 1 Then
                Call DummyPolygoneLine(X, Y)
            End If
       
        
 End If
     
     If toolc = "DrawCircleX" Then
        Me.DummyShapeCircle.Visible = True
            'Call drawCircle2D(X, Y)
            Call dummycirclex(X, Y)
    End If
    If mdown = 1 Then
        If toolc = "Pen" Then
        Call penTo
        ElseIf toolc = "Point" Then
        Call pointTo(X, Y)
        ElseIf toolc = "Circle" Then
                'Call circleTo(x, y, dimc)
        Call dummycircle(X, Y)
        
        ElseIf toolc = "Elipse" Then
                'Call circleTo(x, y, dimc)
        Call dummyelipse(X, Y)
        
        ElseIf toolc = "Line" Then
        Call DUMMYLINE(X, Y)
        
        ElseIf toolc = "Square" Then
            If toolb = "FilledSquare" Then
                Call DUMMYSQUARE(X, Y)
            Else
                Call DUMMYSQUARE(X, Y)
            End If
        ElseIf toolc = "FilledSquare" Then
            Call solidsquareTo(X, Y, dimc)
        ElseIf toolc = "polygon" Then
        
        Call DummyPolygoneLine(X, Y)
        ElseIf toolc = "radiera" Then
            Call pointTo(X, Y)
        ElseIf toolc = "filledCircle" Then
                Call filledCircleDraw(X, Y)
                
        
        End If
       
    Else
        mdown = 0
    End If
    cx = X
    cy = Y
    Me.Caption = "Draw " & X & " : " & Y

Me.Text3.Text = X

Me.Text4.Text = Y

Me.Line1.X1 = X + Picture1.Left

Me.Line1.X2 = X + Picture1.Left
Me.Line1.Y1 = 1680
Me.Line1.Y2 = 1200

Me.Line2.X1 = 1680

Me.Line2.X2 = 1200
Me.Line2.Y1 = Y + Picture1.Top
Me.Line2.Y2 = Y + Picture1.Top

Call showHexandRGB(X, Y, Me.Text6)

'runtime error 380
On Error Resume Next
Me.pboxCurrentPixelColor.BackColor = Me.Picture1.Point(X, Y)
fx = X - dx
fy = Y - dy
Me.Text8.Text = Sqr(fx * fx + fy * fy)

If mtdown = 1 Then

If toolc = "TEXT" Then
    Picture1.CurrentX = X
    Picture1.CurrentY = Y
    lblDummy.Top = dy - 5
    lblDummy.Left = dx - 5
    Set lblDummy.Container = Me.Picture1
    lblDummy.Visible = True
    lblDummy.Top = Y - 5
    lblDummy.Left = X - 5
   ' Picture1.FontName = .cboFontName.List(.cboFontName.ListIndex)
 'Picture1.FontBold = .txt1Bold
 'Picture1.FontItalic = .txt1Italic
 'Picture1.FontUnderline = .txt1Underline
 'Picture1.FontSize = .txt1FontSize
 'now set the print position for the text and print it
 'Picture1.CurrentY = Val(.txtVert)
 'Picture1.CurrentX = Val(.txtHorz)
 'Picture1.Print .Text1

 '   Picture1.Print textPicture
End If
End If

'If mtdown = 0 Then

'If toolc = "TEXT" Then
'lblDummy.Visible = True
'lblDummy.Top = Y
'    lblDummy.Left = X
'End If
'End If
End Sub

Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

mdown = 0
mtdown = 0
If lineDraw = True Then
Call lineTo(X, Y, dx, dy)
lineDraw = False
Me.LineDummy.Visible = False
End If

If toolc = "ShapeAdd" Then

    Dim myShape As Shape
Set myShape = Controls.Add("vb.Shape", "myShape" & ShapeNo)
ShapeNo = ShapeNo + 1
Set myShape.Container = Me.Picture1
    myShape.Visible = True
    myShape.Left = dx
    myShape.Top = dy
    If Me.cboShapes.ListIndex >= 0 Then
    myShape.Shape = Me.cboShapes.ListIndex
    End If
    myShape.Width = Val(Me.Text10.Text)
    myShape.Height = Val(Me.Text9.Text)
End If
If toolc = "Pie" Then
    Call DrawPieChart
End If

If SQUAREDRAW = True Then

    If toolb = "FilledSquare" Then
             Call squareToDSf(Me.Text1.Text, Me.Text2.Text, Me.Text3.Text, Me.Text4.Text)
    Else
            Call squareToDS(Me.Text1.Text, Me.Text2.Text, Me.Text3.Text, Me.Text4.Text)
    End If
    SQUAREDRAW = False
  Me.DummyShape.Visible = False
End If
    
 If toolc = "DrawCircleX" Then
            Call drawCircle2D(X, Y)
 End If
    
If circledraw = True Then

'circle

    If drawCircleMode = 1 Then
       Call circleTo(dx + dimdiff / 2, dy + dimdiff / 2, dimdiff / 2)
       
    ElseIf drawCircleMode = 2 Then
         Call circleTo(dx + dimdiff / 2, Y + dimdiff / 2, dimdiff / 2)
   
    ElseIf drawCircleMode = 3 Then
        Call circleTo(X + dimdiff / 2, Y + dimdiff / 2, dimdiff / 2)
        
    ElseIf drawCircleMode = 4 Then
        Call circleTo(X + dimdiff / 2, dy + dimdiff / 2, dimdiff / 2)

    End If

    
    circledraw = False

  Me.DummyShapeCircle.Width = 0
    Me.DummyShapeCircle.Height = 0
     Me.DummyShapeCircle.Visible = False
End If


'AM RAMAS AICI

If elipsedraw = True Then
razaa = Abs(dimdiffx / 2)
ratiaa = Abs(dimdiffx / dimdiffy)
'elipse
    If drawElipseMode = 1 Then
        'workfinaly
        'Call elipseTo(dx + dimdiffx / 2, dy + dimdiffy / 2, razaa, ratiaa)
        'toHORIZ
        If (dimdiffx > dimdiffy) Then
            razaa = Abs(dimdiffx / 2)
            ratiaa = Abs(dimdiffy / dimdiffx)
                Call elipseTo(dx + dimdiffx / 2, dy + dimdiffy / 2, razaa, ratiaa)
        End If
        'toVERT
        If (dimdiffy > dimdiffx) Then
            razaa = Abs(dimdiffy / 2)
            ratiaa = Abs(dimdiffy / dimdiffx)
                Call elipseTo(dx + dimdiffx / 2, dy + dimdiffy / 2, razaa, ratiaa)
        End If
    ElseIf drawElipseMode = 2 Then
        'Call elipseTo(dx + dimdiffx / 2, Y + dimdiffy / 2, razaa, ratiaa)
        ' ratiaa = Abs(dimdiffy / dimdiffx)
        'Call elipseTo(dx + dimdiffx / 2, Y + dimdiffy / 2, razaa, ratiaa)
        
        'workfinaly
        'Call elipseTo(dx + dimdiffx / 2, dy + dimdiffy / 2, razaa, ratiaa)
        'toHORIZ
        If (dimdiffx > dimdiffy) Then
            razaa = Abs(dimdiffx / 2)
            ratiaa = Abs(dimdiffy / dimdiffx)
                Call elipseTo(dx + dimdiffx / 2, Y + dimdiffy / 2, razaa, ratiaa)
        End If
        'toVERT
        If (dimdiffy > dimdiffx) Then
            razaa = Abs(dimdiffy / 2)
            ratiaa = Abs(dimdiffy / dimdiffx)
                Call elipseTo(dx + dimdiffx / 2, Y + dimdiffy / 2, razaa, ratiaa)
        End If
        
    ElseIf drawElipseMode = 3 Then
        'Call elipseTo(X + dimdiffx / 2, Y + dimdiffy / 2, razaa, ratiaa)
        ' ratiaa = Abs(dimdiffy / dimdiffx)
        'Call elipseTo(X + dimdiffx / 2, Y + dimdiffy / 2, razaa, ratiaa)
        
        If (dimdiffx > dimdiffy) Then
            razaa = Abs(dimdiffx / 2)
            ratiaa = Abs(dimdiffy / dimdiffx)
                Call elipseTo(X + dimdiffx / 2, Y + dimdiffy / 2, razaa, ratiaa)
        End If
        'toVERT
        If (dimdiffy > dimdiffx) Then
            razaa = Abs(dimdiffy / 2)
            ratiaa = Abs(dimdiffy / dimdiffx)
                Call elipseTo(X + dimdiffx / 2, Y + dimdiffy / 2, razaa, ratiaa)
        End If
        
        
    ElseIf drawElipseMode = 4 Then
        'Call elipseTo(X + dimdiffx / 2, dy + dimdiffy / 2, razaa, ratiaa)
        ' ratiaa = Abs(dimdiffy / dimdiffx)
        'Call elipseTo(X + dimdiffx / 2, dy + dimdiffy / 2, razaa, ratiaa)
        
        If (dimdiffx > dimdiffy) Then
            razaa = Abs(dimdiffx / 2)
            ratiaa = Abs(dimdiffy / dimdiffx)
                Call elipseTo(X + dimdiffx / 2, dy + dimdiffy / 2, razaa, ratiaa)
        End If
        'toVERT
        If (dimdiffy > dimdiffx) Then
            razaa = Abs(dimdiffy / 2)
            ratiaa = Abs(dimdiffy / dimdiffx)
                Call elipseTo(X + dimdiffx / 2, dy + dimdiffy / 2, razaa, ratiaa)
        End If
    End If
    
   elipsedraw = False

  Me.DummyShapeOval.Width = 0
    Me.DummyShapeOval.Height = 0
     Me.DummyShapeOval.Visible = False
End If

If (toolc = "polygon") Then

   'error polygone
   Me.LineDummy.Visible = False
   Call lineTo(dx, dy, X, Y)
   dx = X
   dy = Y
End If



If mtdown = 0 Then

    If toolc = "TEXT" Then
    lblDummy.Visible = False
    'Picture1.Print textPicture
    End If
End If

  

End Sub

Private Sub Picture2_Click()

Me.CommonDialog1.ShowColor
colorf = Me.CommonDialog1.Color
Me.Picture1.BackColor = colorf
Me.Picture2.BackColor = colorf
End Sub

Private Sub Picture3_Click()

Me.CommonDialog1.ShowColor
colorc = Me.CommonDialog1.Color
Me.Picture1.ForeColor = colorc
Me.Picture3.BackColor = colorc
End Sub



Private Sub Picture4_Click()

'
pic4selected = 1
Me.Picture4.BackColor = &HC0C0C0
End Sub


Private Sub Picture5_Click()

pic5selected = 1
Me.Picture5.BackColor = &HC0C0C0
End Sub





Private Sub Point2D_Click()

Call pointTo(dx, dy)
End Sub

Private Sub showHexandRGB(X, Y, zObject)


        zObject.Text = X & " : " & Y & " : " & Me.Picture1.Point(X, Y) & " : " & Hex(Me.Picture1.Point(X, Y))

        
        
    
End Sub

Private Sub Save_Click()

Dim namefile As String
Me.CommonDialog1.ShowSave
Me.CommonDialog1.Filter = "*.bmp"
If Me.CommonDialog1.FileName <> "" Then
namefile = Me.CommonDialog1.FileName
SavePicture Me.Picture1.Image, namefile   ' Save picture to file.
End If
End Sub

Private Sub setGrid_Click()

Form2.MyVar = ngrid
Form2.Show
End Sub

Private Sub ShowGrid_Click()

Call gridTo(ngrid)
End Sub

Private Sub SolidRect_Click()

Call solidsquareTo(dx, dy, dimc)
End Sub

Private Sub Splash_Click()

frmSplash.Show
End Sub

Private Sub Square2D_Click()

Call squareTo(dx, dy, dimc)
End Sub






Private Sub TextBox_Click()

Me.CommonDialog1.Flags = cdlCFBoth   ' Flags property must be set

Me.CommonDialog1.ShowFont

'Me.CommonDialog1.FontName = Me.Picture1.Font
Picture1.FontName = Me.CommonDialog1.FontName
 Picture1.FontBold = Me.CommonDialog1.FontBold
 Picture1.FontItalic = Me.CommonDialog1.FontItalic
 Picture1.FontUnderline = Me.CommonDialog1.FontUnderline
  Picture1.FontSize = Me.CommonDialog1.FontSize

 lblDummy.FontName = Me.CommonDialog1.FontName
lblDummy.FontBold = Me.CommonDialog1.FontBold
 lblDummy.FontItalic = Me.CommonDialog1.FontItalic
 lblDummy.FontUnderline = Me.CommonDialog1.FontUnderline
 lblDummy.FontSize = Me.CommonDialog1.FontSize
 lblDummy.Height = FontSize * 100
 lblDummy.Width = Len(textPicture) * 100 * FontSize

 'now set the print position for the text and print it
 'Picture1.CurrentY = dx
 'Picture1.CurrentX = dy
  'Picture1.Print textPicture

  

  
End Sub

Private Sub Tip_Click()

frmTip.Show
End Sub

Private Sub txtDimC_Change()

dimc = txtDimC.Text
End Sub

Private Sub txtWidthDraw_Change()

Me.Picture1.DrawWidth = Me.txtWidthDraw.Text
End Sub

Private Sub squareTo(X, Y, dime)

Picture1.Line (X, Y)-(X + dime, Y + dime), colorc, B
    
End Sub

Private Sub squareToDS(XD1, YD1, XD2, YD2)

Picture1.Line (XD1, YD1)-(XD2, YD2), colorc, B
    
End Sub

Private Sub squareToDSf(XD1, YD1, XD2, YD2)

    Picture1.Line (XD1, YD1)-(XD2, YD2), colorc, BF
End Sub

Private Sub solidsquareTo(X, Y, dime)

Picture1.Line (X, Y)-(X + dime, Y + dime), colorc, BF

    

End Sub


Private Sub lineTo(X, Y, px, py)

Me.Picture1.Line (X, Y)-(px, py), colorc

End Sub


Private Sub clrScrTo()

    Me.Picture1.Cls
End Sub

Private Sub pointTo(X, Y)

If toolc = "radiera" Then
        Me.Picture1.ForeColor = &HFFFFFF
        Me.Picture1.Circle (cx, cy), txtWidthDraw.Text, &HFFFFFF
        Me.Picture1.ForeColor = colorc
        Me.Picture3.BackColor = colorc

Else

    Me.Picture1.Line (X - 10, Y)-(X + 10, Y), colorc
    Me.Picture1.Line (X, Y - 10)-(X, Y + 10), colorc
End If
End Sub

Private Sub Undo_Click()

a = MsgBox("undo function not exist for picturebox in vb6 yet", vbInformation, "Error! Not implemented yet")

End Sub

Comentarii

Postări populare de pe acest blog

program principal cpp

#include "clasa.h" #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> #define DELAY 9000000 void delay() { for(long i=0;i<DELAY;i++); } //constructor cu initializare de la tastatura BigInt::BigInt() {char x; signed char t[400]; int i; printf("\nNumarul cu semn "); do s=getche(); while((s!='+')&&(s!='-')); n=0; do {x=getche(); t[n]=x-'0'; n++; } while((x>='0')&&(x<='9')); n--; for(i=0;i<n;i++) nr[i]=t[n-i-1]; } //constructor cu initializare prin parametri BigInt::BigInt(char semn,signed char numar[],int dim) {int i; s=semn; n=dim; for(i=0;i<n;i++) nr[i]=numar[n-i-1]; } //transform un int negativ in pozitiv int BigInt::Pozitiv(int x) {int a,vb; a=0; vb=0; while(vb==0) if((x+a)==0) vb=1; else a=a+1; x=a; return x; } //constructor dintr-un nr int obisnuit BigInt::BigInt(int x) {int i; if(x>=0) s='+'…

NUMERE PRIME ALGORITM C++

// NUMERE PRIME ALGORITM C++//  reediting from scratch //on this page is just the study for a next algoritm for generating the parime nr series like Fibonnaci or ....if possibile
BPN = 2 POW 74207281 -1

odd impar
even par

!!! any even number is a sum of two even numbers or two odd numbers or two prime numbers
!!! any odd number is a sum of a odd number and a even numbers
!!!  prime numbers can not be a sum of two prime numbers but will be a sum of a prime number and an even number 
!!! any prime numbers will be odd too but not all odd number are primes
!!! all the numbers formed by same digit  1,3,7,9 are not prime numbers except 11


0, 1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 
37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 
79, 83, 89, 97

1 = 1 + 0+ 0              0
2 = 1 + 1+ 0              1
3 = 2 + 1+ 0              1

small numbers 

5 = 3 + 2+ 0              2
7 = 5 + 2 + 0              2
11 = 7 + 3 + 1            4
13 = 11+2 + 0            2
17 = 13 + 3 + 1 4
19 = 17 + 2+ 0 2
23 = 19 + 3 + 1 4
29 = 23 + 5 + …

o aplicatie php localitati romania

//APLICATIA SE REFERA LA BAZA DE DATE SIRUTA

//dragtable.js


/* dragtable v1.0 June 26, 2008 Dan Vanderkam, http://danvk.org/dragtable/ http://code.google.com/p/dragtable/ \Bsortabledraggable\B Instructions: - Download this file - Add <script src="dragtable.js"></script> to your HTML. - Add class="draggable" to any table you might like to reorder. - Drag the headers around to reorder them. This is code was based on: - Stuart Langridge's SortTable (kryogenix.org/code/browser/sorttable) - Mike Hall's draggable class (http://www.brainjar.com/dhtml/drag/) - A discussion of permuting table columns on comp.lang.javascript Licensed under the MIT license. */ // Here's the notice from Mike Hall's draggable script: //***************************************************************************** // Do not remove this notice. // // Copyright 2001 by Mike Hall. // See http…