Лабораторная работа: Creating graphic editor
Main INTERFACE
Source Code:
Dim EraserColor As Long
Dim EraserSize As Integer
Dim PencilSize As Integer
Dim BoxInversed As Boolean
Dim GradationChanged As Boolean
Dim XX As Double, YY As Double
Dim XX2 As Double, YY2 As Double
Dim CurrentChoice
Dim TheColor As Long
Dim Red As Long
Dim Green As Long
Dim Blue As Long
Dim SecondColor As Long
Dim FirstColor As Long
Private Sub BoxOptionInterior_Click (Index As Integer)
BoxOptionSample. BackStyle = IIf (Index = 2, 0, 1)
If Index = 0 Then BoxOptionSample. BackColor = FirstColor
If Index = 1 Then BoxOptionSample. BackColor = SecondColor
If Index = 3 Then BoxOptionSample. BackColor = &HFFFFFF
End Sub
Private Sub ColorBoard_MouseMove (Button As Integer, Shift As Integer, x As Single, y As Single)
On Error GoTo 10
TheColor = ColorBoard. Point (x, y)
If Button <> 1 And Button <> 2 Then Exit Sub
If Button = 1 Then ForeColorSample. BackColor = TheColor: FirstColor = TheColor: g = 0
--> ЧИТАТЬ ПОЛНОСТЬЮ <--