SlideShare a Scribd company logo
1 of 3
Taller No.2
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Dim a, b, c As Integer
a = Val(TextBox1.Text)
b = Val(TextBox2.Text)
c = a + b
TextBox3.Text = c
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles
Button2.Click
Dim a, b, c As Integer
a = Val(TextBox1.Text)
b = Val(TextBox2.Text)
If (a = b) Then
TextBox3.Text = "Son Iguales"
Else
If (a > b) Then
TextBox3.Text = a
Else
TextBox3.Text = b
End If
End If
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click
Dim a As Integer
Dim cad As String
GroupBox1.Text = "For"
cad = ""
For a = 1 To 10
cad = cad + Str(a) + vbNewLine
Next
TextBox4.Text = cad
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles
Button4.Click
Dim a As Integer
Dim cad As String
cad = ""
a = 0
GroupBox1.Text = "While endWhile"
While (a < 10)
a = a + 1
cad = cad + Str(a) + vbNewLine
End While
TextBox4.Text = cad
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles
Button5.Click
Dim a As Integer
Dim cad As String
cad = ""
a = 0
GroupBox1.Text = "do while-loop"
Do While (a < 10)
a = a + 1
cad = cad + Str(a) + vbNewLine
Loop
TextBox4.Text = cad
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles
Button6.Click
Dim a As Integer
Dim cad As String
cad = ""
a = 0
GroupBox1.Text = "Do util - loop"
Do Until (a = 10)
a = a + 1
cad = cad + Str(a) + vbNewLine
Loop
TextBox4.Text = cad
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles
Button7.Click
Dim a As Integer
Dim cad As String
cad = ""
a = 0
Do
a = a + 1
cad = cad + Str(a) + vbNewLine
Loop While (a < 10)
TextBox4.Text = cad
End Sub
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles
Button9.Click
TextBox4.BackColor = Color.Red
End Sub
Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs)
Handles RadioButton1.CheckedChanged
TextBox4.BackColor = Color.Red
End Sub
Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs)
Handles RadioButton2.CheckedChanged
TextBox4.BackColor = Color.Green
End Sub
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles
CheckBox1.CheckedChanged
TextBox4.BackColor = Color.Red
End Sub
Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles
CheckBox2.CheckedChanged
'TextBox4.BackColor = Color.Blue
REM If (TextBox4.BackColor = Color.Red) Then
MsgBox(TextBox4.BackColor = Color.Red)
REM End If
End Sub
End Class
Formulario

More Related Content

What's hot

INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERINSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERDarwin Durand
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY GOKUL SREE
 
Ejercicios vb primer parcial
Ejercicios vb primer parcialEjercicios vb primer parcial
Ejercicios vb primer parcialJose Jimenez
 
The Ring programming language version 1.3 book - Part 10 of 88
The Ring programming language version 1.3 book - Part 10 of 88The Ring programming language version 1.3 book - Part 10 of 88
The Ring programming language version 1.3 book - Part 10 of 88Mahmoud Samir Fayed
 
Reservasi hotel
Reservasi hotelReservasi hotel
Reservasi hoteldian pw
 
Building accessible components
Building accessible componentsBuilding accessible components
Building accessible componentsRicky Onsman
 
ABV_fastcontact
ABV_fastcontactABV_fastcontact
ABV_fastcontactarjun rao
 
C++ Windows Forms L02 - Controls P1
C++ Windows Forms L02 - Controls P1C++ Windows Forms L02 - Controls P1
C++ Windows Forms L02 - Controls P1Mohammad Shaker
 
2018 02-22 React, Redux & Building Applications that Scale | Redux
2018 02-22 React, Redux & Building Applications that Scale | Redux2018 02-22 React, Redux & Building Applications that Scale | Redux
2018 02-22 React, Redux & Building Applications that Scale | ReduxCodifly
 
C++ Windows Forms L03 - Controls P2
C++ Windows Forms L03 - Controls P2C++ Windows Forms L03 - Controls P2
C++ Windows Forms L03 - Controls P2Mohammad Shaker
 

What's hot (19)

INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERINSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
 
Quanlycanbo
QuanlycanboQuanlycanbo
Quanlycanbo
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
Ejercicios vb primer parcial
Ejercicios vb primer parcialEjercicios vb primer parcial
Ejercicios vb primer parcial
 
The Ring programming language version 1.3 book - Part 10 of 88
The Ring programming language version 1.3 book - Part 10 of 88The Ring programming language version 1.3 book - Part 10 of 88
The Ring programming language version 1.3 book - Part 10 of 88
 
Reservasi hotel
Reservasi hotelReservasi hotel
Reservasi hotel
 
Building accessible components
Building accessible componentsBuilding accessible components
Building accessible components
 
ABV_fastcontact
ABV_fastcontactABV_fastcontact
ABV_fastcontact
 
Uni2
Uni2Uni2
Uni2
 
Public class form1
Public class form1Public class form1
Public class form1
 
Android
AndroidAndroid
Android
 
Introduction to JQuery
Introduction to JQueryIntroduction to JQuery
Introduction to JQuery
 
Baitap tkw
Baitap tkwBaitap tkw
Baitap tkw
 
Insertion operation
Insertion operationInsertion operation
Insertion operation
 
9 - OOP - Smalltalk Classes (c)
9 - OOP - Smalltalk Classes (c)9 - OOP - Smalltalk Classes (c)
9 - OOP - Smalltalk Classes (c)
 
C++ Windows Forms L02 - Controls P1
C++ Windows Forms L02 - Controls P1C++ Windows Forms L02 - Controls P1
C++ Windows Forms L02 - Controls P1
 
Database connectivity with data reader by varun tiwari
Database connectivity with data reader by varun tiwariDatabase connectivity with data reader by varun tiwari
Database connectivity with data reader by varun tiwari
 
2018 02-22 React, Redux & Building Applications that Scale | Redux
2018 02-22 React, Redux & Building Applications that Scale | Redux2018 02-22 React, Redux & Building Applications that Scale | Redux
2018 02-22 React, Redux & Building Applications that Scale | Redux
 
C++ Windows Forms L03 - Controls P2
C++ Windows Forms L03 - Controls P2C++ Windows Forms L03 - Controls P2
C++ Windows Forms L03 - Controls P2
 

Similar to Ensayo Convergencia Informatica

Latihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/PerulanganLatihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/PerulanganNurul Arhaiyyu
 
Imports System.Net.Sockets Imports System.Text Public Class Form1 .pdf
  Imports System.Net.Sockets Imports System.Text Public Class Form1   .pdf  Imports System.Net.Sockets Imports System.Text Public Class Form1   .pdf
Imports System.Net.Sockets Imports System.Text Public Class Form1 .pdfapnashop1
 
Christian rodriguez then else
Christian rodriguez then   elseChristian rodriguez then   else
Christian rodriguez then elsegabo2200
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docxgabo2200
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docxgabo2200
 
Guevara rene if then., else
Guevara rene  if then., elseGuevara rene  if then., else
Guevara rene if then., elsegabo2200
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docxgabo2200
 
1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docxcorbing9ttj
 
1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docxcorbing9ttj
 
Parra maxi IF THEN ELSE
Parra maxi IF THEN ELSEParra maxi IF THEN ELSE
Parra maxi IF THEN ELSEgabo2200
 
Updated Visual Basic 6 for beginners.pptx
Updated Visual Basic 6 for beginners.pptxUpdated Visual Basic 6 for beginners.pptx
Updated Visual Basic 6 for beginners.pptxSarveshDeodhar
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITYDOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITYGOKUL SREE
 
Ejercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSEEjercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSERicardoGuti50
 

Similar to Ensayo Convergencia Informatica (20)

Colegio municipal
Colegio municipalColegio municipal
Colegio municipal
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
 
Correction s+ rie_vb
Correction s+ rie_vbCorrection s+ rie_vb
Correction s+ rie_vb
 
Latihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/PerulanganLatihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/Perulangan
 
VB net lab.pdf
VB net lab.pdfVB net lab.pdf
VB net lab.pdf
 
Calculadora
CalculadoraCalculadora
Calculadora
 
Vb file
Vb fileVb file
Vb file
 
Stop watch and array
Stop watch and arrayStop watch and array
Stop watch and array
 
Imports System.Net.Sockets Imports System.Text Public Class Form1 .pdf
  Imports System.Net.Sockets Imports System.Text Public Class Form1   .pdf  Imports System.Net.Sockets Imports System.Text Public Class Form1   .pdf
Imports System.Net.Sockets Imports System.Text Public Class Form1 .pdf
 
Christian rodriguez then else
Christian rodriguez then   elseChristian rodriguez then   else
Christian rodriguez then else
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docx
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docx
 
Guevara rene if then., else
Guevara rene  if then., elseGuevara rene  if then., else
Guevara rene if then., else
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docx
 
1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx
 
1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx
 
Parra maxi IF THEN ELSE
Parra maxi IF THEN ELSEParra maxi IF THEN ELSE
Parra maxi IF THEN ELSE
 
Updated Visual Basic 6 for beginners.pptx
Updated Visual Basic 6 for beginners.pptxUpdated Visual Basic 6 for beginners.pptx
Updated Visual Basic 6 for beginners.pptx
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITYDOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
Ejercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSEEjercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSE
 

Recently uploaded

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Ensayo Convergencia Informatica

  • 1. Taller No.2 Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim a, b, c As Integer a = Val(TextBox1.Text) b = Val(TextBox2.Text) c = a + b TextBox3.Text = c End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Dim a, b, c As Integer a = Val(TextBox1.Text) b = Val(TextBox2.Text) If (a = b) Then TextBox3.Text = "Son Iguales" Else If (a > b) Then TextBox3.Text = a Else TextBox3.Text = b End If End If End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click Dim a As Integer Dim cad As String GroupBox1.Text = "For" cad = "" For a = 1 To 10 cad = cad + Str(a) + vbNewLine Next TextBox4.Text = cad End Sub Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click Dim a As Integer Dim cad As String cad = "" a = 0 GroupBox1.Text = "While endWhile" While (a < 10) a = a + 1 cad = cad + Str(a) + vbNewLine End While TextBox4.Text = cad End Sub Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click Dim a As Integer
  • 2. Dim cad As String cad = "" a = 0 GroupBox1.Text = "do while-loop" Do While (a < 10) a = a + 1 cad = cad + Str(a) + vbNewLine Loop TextBox4.Text = cad End Sub Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click Dim a As Integer Dim cad As String cad = "" a = 0 GroupBox1.Text = "Do util - loop" Do Until (a = 10) a = a + 1 cad = cad + Str(a) + vbNewLine Loop TextBox4.Text = cad End Sub Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click Dim a As Integer Dim cad As String cad = "" a = 0 Do a = a + 1 cad = cad + Str(a) + vbNewLine Loop While (a < 10) TextBox4.Text = cad End Sub Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click TextBox4.BackColor = Color.Red End Sub Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.CheckedChanged TextBox4.BackColor = Color.Red End Sub Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged TextBox4.BackColor = Color.Green End Sub Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
  • 3. TextBox4.BackColor = Color.Red End Sub Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox2.CheckedChanged 'TextBox4.BackColor = Color.Blue REM If (TextBox4.BackColor = Color.Red) Then MsgBox(TextBox4.BackColor = Color.Red) REM End If End Sub End Class Formulario