Категория
Информатика
Тип
лабораторная работа
Страницы
9 стр.
Дата
06.02.2009
Формат файла
.doc — Microsoft Word
Архив
107221.zip — 399.32 kb
  • creating-graphic-editor_107221_1.doc — 470 Kb
  • Readme_docus.me.txt — 125 Bytes
Оцените работу
Хорошо  или  Плохо


Текст работы


CREATING GRAPHIC EDITOROn Visual BasicMain INTERFACESource 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
If Button = 2 Then BackColorSample. BackColor = TheColor: SecondColor = TheColor: g = 3
Scroll(g).Value = TakeRGB (TheColor, 0): Scroll (g + 1).Value = TakeRGB (TheColor, 1): Scroll (g + 2).Value = TakeRGB (TheColor, 2)
10 End Sub
Private Sub Command1_Click()
f$ = InputBox («Input the size of the eraser», «Drawer V1.0», EraserOption. )
f$ = RTrim$(LTrim$(f$))
If «» + f$ Str$(Val (f$)) Then MsgBox «Input error!», vbOKOnly, «Drawer V1.0»: Exit Sub
If Val (f$) Int (Val(f$)) Then MsgBox «Input error!», vbOKOnly, «Drawer V1.0»: Exit Sub
If Val (f$) > 500 Or Val (f$) <



Ваше мнение



CAPTCHA