Z3_1
Option Explicit
Private Sub cmdDodaj_Click()
lblwynik.Caption = Val(Txt1.Text) + Val(Txt2.Text)
End Sub
Private Sub cmdOdejmij_Click()
lblwynik.Caption = Val(Txt1.Text) - Val(Txt2.Text)
End Sub
Private Sub cmdPodziel_Click()
lblwynik.Caption = Val(Txt1.Text) / Val(Txt2.Text)
End Sub
Private Sub cmdPomnó¿_Click()
lblwynik.Caption = Val(Txt1.Text) * Val(Txt2.Text)
End Sub
Z3_2
Option Explicit
Private Sub Command1_Click()
Const pi As Single = 3.1415926
Dim re, ro, dw, dz, q, eta As Double
ro = 1200
dw = 0.216
dz = 0.0889
eta = 1.734
q = InputBox("wprowadź wartość q")
re = (4 * ro * q) / (pi * (dw - dz) * eta)
MsgBox (re)
End Sub
Z3_3
Option Explicit
Private Sub Command1_Click()
Const pi As Single = 3.1415926
Dim re, ro, dw, dz, q, eta As Double
ro = 1200
dw = 0.216
dz = 0.0889
eta = 1.734
lstRe.Clear
For q = 0.03 To 0.1 Step 0.01
re = (4 * ro * q) / (pi * (dw - dz) * eta)
lstRe.AddItem re
Next q
End Sub
Z3_4
Option Explicit
Private Sub Command1_Click()
Const pi As Single = 3.1415926
Dim re, ro, dw, dz, q, eta As Double
ro = Val(Txtro.Text)
dw = Val(Txtdw.Text)
dz = Val(Txtdz.Text)
eta = Val(Txteta.Text)
For q = 0.03 To 0.1 Step 0.01
lstq.AddItem q
re = (4 * ro * q) / (pi * (dw - dz) * eta)
lstRe.AddItem re
Next q
End Sub
Z3_5
Option Explicit
Private Sub cmdRe_Click()
Dim Re, ro, Dw, dz, eta, pi, Q, x, y, z As Double
ro = Val(txtro.Text)
Dw = Val(txtDw.Text)
dz = Val(txtdz.Text)
eta = Val(txteta.Text)
x = Val(txtod.Text)
y = Val(txtdo.Text)
z = Val(txtkrok.Text)
pi = 3.1415926
lstRe.Clear
lstQ.Clear
For Q = x To y Step z
Re = (4 * ro * Q) / (pi * (Dw - dz) * eta)
lstRe.AddItem Re
lstQ.AddItem Q
Next Q
End Sub
Private Sub Text1_Change()
End Sub