Escolar Documentos
Profissional Documentos
Cultura Documentos
Text1.Text = a / Val(Text1.Text)
Case 5:
Text1.Text = a ^ (1 / Val(Text1.Text))
Case 6:
Text1.Text = a ^ Val(Text1.Text)
End Select
End Sub
Private Sub MINUS_Click()
a = Val(Text1.Text)
Text1.Text = ""
OP = 2
End Sub
Private Sub ONE_Click()
Text1.Text = Text1.Text + "1"
End Sub
Private Sub PLUS_Click()
'a = Val(Text1.Text)
a = Val(Text1.Text)
Text1.Text = ""
OP = 1
End Sub
Private Sub SQRT_Click()
Text1.Text = Sqr(Val(Text1.Text))
End Sub
Private Sub TWO_Click()
Text1.Text = Text1.Text + "2"
End Sub
Private Sub THREE_Click()
Text1.Text = Text1.Text + "3"
End Sub
Private Sub FOUR_Click()
Text1.Text = Text1.Text + "4"
End Sub
Private Sub FIVE_Click()
Text1.Text = Text1.Text + "5"
End Sub
Private Sub SIX_Click()
Text1.Text = Text1.Text + "6"
End Sub
First name, Last name(text box), Mrks obtained(text box), Year of passing(text box)
Select your department (combo),Password(text box),two radio buttons male and
female,One submit button and clear form is there. If we click on the submit button it will
hit on the next page congrats which consists of massages i.e: congrats U have done it
successfully
Answer:
<head>
<a href="http://www.w3schools.com/">Visit W3Schools</a>
<title>
web page</title>
<meta http-equiv="refresh"content="07"/>
</head>
<body>
<body bgcolor=cyan text=black>
<h2 style="background-color:red;">Student's database</h2>
<p><center> Fill it carefully </p></center>
<form name="LoginForm"method=post action="first.html">
First name: <input type="text"name="firstname" size="25"/></br></br>
Last name: <input type="text"name="lastname"size="25"/></br></br>
Marks obtained: <input type="text"name="marks"size="20"/></br></br></br>
Year of passing: <input type="text"name="Year"size="12"/> </br></br></br>
<p>Select Your Department </p>
<select>
<option></option>
<option>Computer Science</option>
<option> Information Technology</option>
<option> Electronics </option>
</select>
<p>
password: <input
type="text"name="pwd"value=""size="25"/></p></br></br></br>
<p><label><input type="radio"name="gender"value="male">
male</label>
<p> <label><input type="radio" name="gender"value="female">
female</label>
<p>
<input type="submit"value="submit"/>
<input type="reset"value="clear form"/>
</p>
</form>
</body>
</html>
<body bgcolor=cyan>
<h1> This is second page </h1>
<p> <center> congrts !!!! You have done it successfully</center></p>
</body>
</html>
3.Write a V.B Program consists of combo box where u can enter 10 numbers.Two
command boxes are there named as add and remove. If u click on the add buttons no to
be added in the list box and after clicking on the remove button items to be removed:
Answer:
Dim i As Integer
Dim j As Integer
Private Sub Command1_Click()
List1.List(j) = Val(Combo1.Text)
j=j+1
End Sub
Private Sub Command2_Click()
If (j = 0) Then
MsgBox ("There is no item to be delete!!!"), vbInformation, "select & remove"
Exit Sub
End If
For i = 1 To j
If (i = j And j > 0) Then
List1.RemoveItem (0)
j=j-1
Exit Sub
End If
If List1.Selected(i) = True Then
List1.RemoveItem (i)
j=j-1
Exit Sub
End If
Next
End Sub
Private Sub Form_Load()
List1.List(j) = ""
j=0
i=0
With Combo1
.AddItem 1
.AddItem 2
.AddItem 3
.AddItem 4
.AddItem 5
.AddItem 6
.AddItem 7
.AddItem 8
.AddItem 9
End With
End Sub