,
Button1 Button2, .
, . , , , . Sub, - . Sub Sub End Sub. , , , . , .
VB Button2_Click().
, , SubEndSub, , , . - Button2, , .
End, .
, , VB End VB. End . End , , VB. , VS, VB, . . VS , , , , , . , , , , . .
End , Private Sub End Sub. , . , , .
, ,
, .
, , Button1.
|
|
, . , , . , , . Form1.vb[].
.
, , Button2, , Button1.
ܻ, Button1. ( ). - .
Private Sub Button1_Click() End Sub , . 4.2.5-6.
<Enter> , <> , . 4.2-5.6. ( .) , , .
VB , . , , . VB , , , . , . . , VB .
, Public Class Form1 VB:
Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click Dim A As Single, B As Single, C As Single Dim P As Single, Pp As Single, S As Single ' TextBox2 B = TextBox4.2.Text ' TextBox1 A = TextBox1.Text ' TextBox3 C = TextBox3.Text ' P = (A + B + C) ' Pp = P / 2 ' . S S = Sqrt(Pp * (Pp - A) * (Pp - B) * (Pp - C))) ' . TextBox4 TextBox4.Text = P ' TextBox5. TextBox5.Text = S End Sub Private Sub Button2_Click(ByVal sender As System.Object, _ ByVale As System.EventArgs) Handles Button4.2.Click End End Sub |
. 4.2.5-6.
, .4.2.5-7.
VB, , . , ('). . VB ; , . , , .
|
|
, , , .
, , , . , , . ( VS , , VS .)
.
.4.2.5-7.
4.7) IntelliSense
, VB . , ? , , . .
. 4.2.5-8. IntelliSense
IntelliSense. IntelliSense . IntelliSense , , ; . , IntelliSense . , Text. , . <Tab> . IntelliSense, . , . ,
, , TextBox2, . , IntelliSense TextBox2. IntelliSense (. 4.2.5-8).
, , T, IntelliSense , T. IntelliSense , .
IntelliSense, , . , , , (Read Only, . . ). , , , , () .