9
: .
. -11.
: ..
2012
Visual Basic.
Visual Basic
Visual Basic
, .
.
.
.
1.
:
Private Sub Command1_Click()
Picture1.Cls
x0 = -10
y0 = 1 / (x0 ^ 2 - 2 * x0 + 1)
n = 0
For x = x0 To n Step 0.5
y = 1 / (x ^ 2 - 2 * x + 1)
Picture1.Line (3000 + x0 * 200, 1000 - y0 * 900)-(3000 + x * 200, 1000 - y * 900), RGB(255, 0, 0)
x0 = x
y0 = y
Next x
End Sub
2.
:
Private Sub Form_Activate()
Picture1.Circle (450, 500), 300, RGB(255, 0, 0)
Picture1.Circle (450, 1200), 300, RGB(255, 255, 0)
Picture1.Circle (450, 1900), 300, RGB(0, 255, 0)
End Sub
Private Sub Command1_Click()
Picture1.FillColor = &H8000000F
Picture1.FillStyle = 0
Picture1.Circle (450, 1200), 300, RGB(255, 255, 0)
Picture1.Circle (450, 1900), 300, RGB(0, 255, 0)
Picture1.FillColor = QBColor(12)
Picture1.FillStyle = 0
Picture1.Circle (450, 500), 300, RGB(255, 0, 0)
End Sub
Private Sub Command2_Click()
Picture1.FillColor = &H8000000F
Picture1.FillStyle = 0
Picture1.Circle (450, 500), 300, RGB(255, 0, 0)
Picture1.Circle (450, 1900), 300, RGB(0, 255, 0)
Picture1.FillColor = QBColor(14)
Picture1.FillStyle = 0
Picture1.Circle (450, 1200), 300, RGB(255, 255, 0)
End Sub
Private Sub Command3_Click()
Picture1.FillColor = &H8000000F
Picture1.FillStyle = 0
Picture1.Circle (450, 500), 300, RGB(255, 0, 0)
Picture1.Circle (450, 1200), 300, RGB(255, 255, 0)
Picture1.FillColor = QBColor(10)
Picture1.FillStyle = 0
Picture1.Circle (450, 1900), 300, RGB(0, 255, 0)
End Sub
Private Sub Command4_Click()
End
End Sub
,
:
, : , , , , , , . .
:
, ;
;
, .
. Twip. , ScaleMode.
|
|
, :
16 QBcolor(n), n - :
, , :
o RGB(n1,n2,n3). n1, n2 n3 0 255, . : RGB(0, 255, 0) - ().
o : &H8000000F&, &H000000FF& ..
.
.
[.] Pset (x,y) [,]
- (x,y) -
(), .
[.] Line [(x1,y1)] - (x2,y2) [,] [, B [ F ]]
- (x1,y1) - . , . (x2,y2) .
. , ForeColor. QBColor(n) RGB(n1,n2,n3).
B (Box-), ; . (. ), FillColor, FillStyle . F, , . F B.