VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "moment"
   ClientHeight    =   4440
   ClientLeft      =   60
   ClientTop       =   456
   ClientWidth     =   5016
   LinkTopic       =   "Form1"
   ScaleHeight     =   4440
   ScaleWidth      =   5016
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox Text5 
      Height          =   285
      Left            =   1680
      TabIndex        =   18
      Top             =   3960
      Width           =   1215
   End
   Begin VB.ComboBox Combo4 
      Height          =   315
      Left            =   4080
      TabIndex        =   16
      Text            =   "10"
      Top             =   240
      Width           =   735
   End
   Begin VB.TextBox Text4 
      Height          =   285
      Left            =   1680
      TabIndex        =   14
      Top             =   3480
      Width           =   1215
   End
   Begin VB.ComboBox Combo3 
      Height          =   315
      Left            =   1680
      TabIndex        =   13
      Text            =   "Select"
      Top             =   2880
      Width           =   1215
   End
   Begin VB.ComboBox Combo2 
      Height          =   315
      Left            =   1680
      TabIndex        =   12
      Text            =   "Select"
      Top             =   2280
      Width           =   1215
   End
   Begin VB.ComboBox Combo1 
      Height          =   315
      Left            =   1680
      TabIndex        =   11
      Text            =   "Select"
      Top             =   1680
      Width           =   1215
   End
   Begin VB.TextBox Text3 
      Height          =   285
      Left            =   1680
      TabIndex        =   10
      Top             =   1200
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   1680
      TabIndex        =   9
      Top             =   720
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   1680
      TabIndex        =   8
      Top             =   240
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Calculate!"
      Height          =   375
      Left            =   3360
      TabIndex        =   7
      Top             =   3840
      Width           =   1215
   End
   Begin VB.Label Label9 
      Caption         =   "W"
      Height          =   255
      Left            =   120
      TabIndex        =   17
      Top             =   3960
      Width           =   1215
   End
   Begin VB.Label Label8 
      Caption         =   "Corrosion %"
      Height          =   255
      Left            =   3120
      TabIndex        =   15
      Top             =   240
      Width           =   855
   End
   Begin VB.Label Label7 
      Caption         =   "Mn"
      Height          =   255
      Left            =   120
      TabIndex        =   6
      Top             =   3480
      Width           =   1215
   End
   Begin VB.Label Label6 
      Caption         =   "No of layers"
      Height          =   375
      Left            =   120
      TabIndex        =   5
      Top             =   1680
      Width           =   1215
   End
   Begin VB.Label Label5 
      Caption         =   "Thickness"
      Height          =   375
      Left            =   120
      TabIndex        =   4
      Top             =   2280
      Width           =   1215
   End
   Begin VB.Label Label4 
      Caption         =   "Material"
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   2880
      Width           =   1215
   End
   Begin VB.Label Label3 
      Caption         =   "fcd"
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   1200
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "Wf"
      Height          =   255
      Left            =   120
      TabIndex        =   1
      Top             =   720
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "Width b"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'A.Leema Rose, Research Scholar, Dept. of Civil & Structural Engg, Annamalai University, India.
'Dr.K.Suguna, Professor of Structural Engineering, Annamalai University, India.
'Name of the Program:GFRP laminated beams.vbp
'Compiler:Visual Basic 6.0 compiler
'Purpose:Predicting the ultimate load and moment for GFRP laminated RC beams using ACI equations
'Course:Ph.d
'Duration:2006-2009
Dim d, beta1, psif, fs, gama, w, l, b, h, vas, wf, c, af, ffe, n, cp, tf, ef, efe, fcd, mn As Variant

Private Sub Command1_Click()
n = Val(Combo1.Text)
tf = Val(Combo2.Text)
wf = Val(Text2.Text)
fcd = Val(Text3.Text)
af = n * tf * wf
b = Val(Text1.Text)
cp = Val(Combo4.Text)
If cp = 0 Then
vas = 226.08
End If
If cp = 10 Then
vas = 203.47
End If
If cp = 25 Then
vas = 169.56
End If
If Combo3.Text = "Chopped Stranded Mat" Then
If tf = 3 Then
ef = 7467.46
efe = 0.0169
End If
If tf = 5 Then
ef = 11386.86
efe = 0.0137
End If
End If
If Combo3.Text = "Uni Directional Cloth" Then
If tf = 3 Then
ef = 13965.63
efe = 0.0302
End If
If tf = 5 Then
ef = 17365.38
efe = 0.026
End If
End If
If Combo3.Text = "No Material" Then
If tf = 3 Then
ef = 0
efe = 0
End If
If tf = 5 Then
ef = 0
efe = 0
End If
End If
ffe = ef * efe
c = ((vas * fs) + (af * ffe)) / (gama * fcd * beta1 * b)
mn = (vas * fs * (d - ((beta1 * c) / 2)) + psif * af * ffe * (h - ((beta1 * c) / 2)))
Text4.Text = mn
w = (6 * mn) / l
Text5.Text = w
End Sub

Private Sub Form_Load()
Combo1.AddItem ("0")
Combo1.AddItem ("1")
Combo2.AddItem ("0")
Combo2.AddItem ("3")
Combo2.AddItem ("5")
Combo3.AddItem ("No Material")
Combo3.AddItem ("Chopped Stranded Mat")
Combo3.AddItem ("Uni Directional Cloth")
Combo4.AddItem ("0")
Combo4.AddItem ("10")
Combo4.AddItem ("25")
d = 219
h = 219
beta1 = 0.85
psif = 0.85
l = 2800
fs = 332
gama = 0.85
End Sub
 
by

Visual basic (VB.net) Online Compiler

Write, Run & Share VB.net code online using OneCompiler's VB.net online compiler for free. It's one of the robust, feature-rich online compilers for VB.net language, running on the latest version 16. Getting started with the OneCompiler's VB.net compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as VB.net. OneCompiler also has reference programs, where you can look for the sample code to get started with.

Read input from STDIN in VB.net

OneCompiler's VB.net online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample VB.net program which takes name as input and prints hello message with your name.

Public Module Program
	Public Sub Main(args() As string)
	 Dim name as String = Console.ReadLine()    ' Reading input from STDIN
   Console.WriteLine("Hello " & name)           ' Writing output to STDOUT
	End Sub
End Module

About VB.net

Visual Basic is a event driven programming language by Microsoft, first released in the year 1991.

Key Features

  • Beginner's friendly language.
  • Simple and object oriented programming language.
  • User friendly language and easy to develop GUI based applications.

Syntax help

Variables

Variable is a name given to the storage area in order to identify them in our programs.

Simple syntax of Variable declaration is as follows

Dim variableName [ As [ New ] dataType ] [ = initializer ]

Variable initialization

variableName = value

Conditional Statements

1. If

If condition-expression Then 
    'code
End If

2. If-else

If(conditional-expression)Then
   'code if the conditional-expression is true 
Else
  'code if the conditional-expression is false 
End If

3. If-else-if ladder

If(conditional-expression)Then
   'code if the above conditional-expression is true 
Else If(conditional-expression) Then
        'code if the above conditional-expression is true 
    Else
        'code if the above conditional-expression is false 
End If

4. Nested-If

If(conditional-expression)Then
   'code if the above conditional-expression is true
   If(conditional-expression)Then
         'code if the above conditional-expression is true 
   End If
End If

5. Select Case

Select [ Case ] expression
   [ Case expressionlist
      'code ]
   [ Case Else
      'code ]
End Select

Loops

1. For..Next

For counter [ As datatype ] = begin To end [ Step step ]
   'code
   [ Continue For ]
   'code
   [ Exit For ]
   'code
Next [ counter ]

2. For..Each

For Each element [ As datatype ] In group
   'code
   [ Continue For ]
   'code
   [ Exit For ]
   'code
Next [ element ]

3. While

While conditional-expression
   'Code 
   [ Continue While ]
   'Code
   [ Exit While ]
   'Code
End While

4. Do-while

Do { While | Until } conditional-expression
   'Code
   [ Continue Do ]
   'Code
   [ Exit Do ]
   'Code
Loop
Do
   'Code
   [ Continue Do ]
   'Code
   [ Exit Do ]
   'Code
Loop { While | Until } conditional-expression

Procedures

Procedure is a sub-routine which contains set of statements. Usually Procedures are written when multiple calls are required to same set of statements which increases re-usuability and modularity.

Procedures are of two types.

1. Functions

Functions return a value when they are called.

[accessModifiers] Function functionName [(parameterList)] As returnType
   'code
End Function

2. Sub-Procedures

Sub-procedures are similar to functions but they don't return any value.

Sub ProcedureName (parameterList)
'Code
End Sub