Posts

Write a visual program to calculate average using runtime textbox

Image
Write a visual program to calculate average using runtime text-box Design window:- Code: Dim t1 As TextBox Dim t2 As TextBox Dim t3 As TextBox Dim t4 As TextBox Dim a As Integer Dim b As Integer Dim c As Integer Private Sub cmdClear_Click() t1.Text = "" t2.Text = "" t3.Text = "" t4.Text = "" t1.SetFocus End Sub Private Sub cmdDisplay_Click()  a = Val(t1.Text)  b = Val(t2.Text)  c = Val(t3.Text)  t4.Text = (a + b + c) / 3 End Sub Private Sub cmdExit_Click() Unload Me End Sub Private Sub Form_Activate()     Set t1 = Controls.Add("VB.TextBox", "t1")     t1.Visible = True     t1.Height = 600     t1.Width = 2200     t1.Top = 100     t1.Left = 3200     t1.SetFocus                 Set t2 = Controls.Add("VB.TextBox", "t2")     t2.Visible = True     t2.Height = 600     t2.Width = 2200   ...

Write a Visual Basic program to implement the find and replace dialogue box for text-box

Image
Design an application in Visual Basic to implement the find and replace dialogue box for text-box control with multiple line of text with 3 option buttons and check boxes Design window of form:- Code:- Dim txt As String Dim s, l, r As Integer Private Sub Check1_Click(Index As Integer)     If Check1(0).Value = 1 Then         Text1.Font.Bold = True     Else         Text1.Font.Bold = False     End If     If Check1(1).Value = 1 Then         Text1.Font.Italic = True     Else         Text1.Font.Italic = False     End If     If Check1(2).Value = 1 Then         Text1.Font.Underline = True     Else         Text1.Font.Underline = False     End If End Sub Private Sub cmdClear_Click() Option1(0).Value = False Option2(1).Value = False Option3(2).Value = False C...