Welcome to my blog..

Feel free to read/copy anything and please put the reference link to original source.
Share your blog link at the bottom of this page.

my sharing server :
How to download : http://rionix88.blogspot.com/2011/04/rionix-sharing.html
Other Sharing site : http://rionix88.blogspot.com/2011/01/ump-sharing-links-2.html

buat duit : http://rionix88.blogspot.com/2011/01/buat-ump-sharing-buat-duit.html

How to build server : http://rionix88.blogspot.com/2011/01/kaedah-membuat-ump-sharing-server.html

21 August 2009

VB6 : Reaction Calculation (case 3)

3 textbox, 2 label, 1 button

Private Sub Command1_Click()
Dim a, b As Single
Dim c, d As Integer

'Dalam satu declare leh ada dua nama je, kalo lebih buat declaration baru.

a = (Text2.Text) 'length 1
b = (Text3.Text) 'length 2
d = a + b 'total length
c = Text1.Text * Text2.Text

Label2.Caption = (c / d) 'reaction b
Label1.Caption = (Text1.Text) - (Label2.Caption)
End Sub

Data yg boleh dimasukkan dlm kotak input cuma single (sbb korg declare single)
kalau data lain kuar error.

No comments:

Post a Comment

Blog Exchange