1) VS 5.1-2, Button . Button, , . , , . , , .
2) .
3) , Text .
4) TextBox. VS .
5) Multiline True, ScrollBars Vertical. .
6) , , , .
7) .
.
8) Cykl() Button1_Click(), . 4.5.1-8.
Public Class Form1 Sub Cykl(ByVal Line As String) Dim i As Integer For i = 1 To 10 TextBox1.Text = TextBox1.Text & Line & i & vbCrLf Next i End Sub Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click Dim Line As String = "Line " Cykl(Line) End Sub End Class |
. 4.5.1-8. 5.1-2
9) , For...Next,
Line i, i - ( , Line 1 Line 10). (&) . , Text, , . , Line, vbCrLf. Next .
10) , For VS Next.
11) ,
.
12) .
13) .
For...Next 10 , . 4.5.1-9.
. 4.5.1-9. 5.1-2
|
|
14) .
15) For...Next 10 . , . 10 .
16) , . , . 32 . , RichTextBox , .
4.5.1-3. /, .
vvodDbl1() vivodDbl1() Double ,
vvodSng3() vivodSng3() Single ,
vvodInt4() vivodInt4() Integer ,
vvodLng5() vivodLng5() Long ,
vivodDblFx6() vivodLngFx7() Double Long,
vivodDblFxy8() Double.
vvodDbl1(), vivodDbl1(), vvodSng3(), vivodSng3(), vvodIDbl2() vivodDbl2() 4.3, vvodInt4() vivodInt4() 4.4, vvodLng5(),
vivodLng5(), vivodDblFx6(), vivodLngFx7(), vivodSngFxy8(),
vvodInt9(),vivodInt9() . 4.5.1-10 4.5.1-16.
' Long TextBox Function vvodLng5(ByVal T As TextBox) As Long Return CLng(T.Text) End Function |
. 4.5.1-10. vvodLng5()
Long TextBox 4.5.1-3
' Long TextBox Sub vivodLng5(ByVal l As Long, ByVal T As TextBox) T.Text = CStr(l) End Sub |
. 4.5.1-11. vivodLng5()
Long TextBox 4.5.1-3
' Double TextBox Sub vivodDblFx6(ByVal x As Double, ByVal T As TextBox) T.Text = T.Text + Format(x, "0.000 ") End Sub |
. 4.5.1-12. vivodDblFx6()
Double TextBox 4.5.1-3
' Long TextBox Sub vivodLngFx7(ByVal x As Long, ByVal T As TextBox) T.Text = T.Text + Format(x, "0") End Sub |
. 4.5.1-13. vivodLngFx7()
Long TextBox 4.5.1-3
' 2 Single TextBox Sub vivodSngFxy8(ByVal x As Single,ByVal y As Single, _ ByVal T As TextBox) T.Text = T.Text + Format(x, "0.000 ") + Space(8) + _ Format(y, "0.000 ") + vbCrLf End Sub |
. 4.5.1-14. vivodSngFxy8()
2 Single TextBox 4.5.1-3
'-Function Integer InputBox() Function vvodInt9(ByVal p As String, ByVal T As TextBox) _ As Integer T.Text = InputBox(P) Return CInt(T.Text) End Function |
|
|
. 4.5.1-15. vvodInt9()
Integer InputBox()
4.5.1-3
' Integer MsgBox() Sub vivodInt9(ByVal I As Integer, _ ByVal S As String, ByVal T As TextBox) T.Text = MsgBox(CStr(I), S) End Sub |
. 4.5.1-16. vivodInt9()
Integer MsgBox()
4.5.1-3
, Format(), .4.2.4-2.