• Like
Código fuente del software educativo
Upcoming SlideShare
Loading in...5
×

Código fuente del software educativo

  • 349 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
349
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
38
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. CÓDIGO FUENTE DEL SOFTWARE EDUCATIVO “APRENDO JUGANDO” HECHO EN VISUAL BASIC.NET 2010.VENTANA DE BIENVENIDOSPublic Class bienvenidos Private Sub bienvenidos_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load Timer1.Enabled = True End Sub Private Sub Timer1_Tick (ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Timer1.Tick inicio.Show() Me.Hide()
  • 2. Timer1.Enabled = False End SubEnd ClassVENTANA DE INICIOPublic Class inicio Private Sub inicio_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click
  • 3. lenguaje.Show() Me.Close() End Sub Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles PictureBox2.Click End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click estrategias.show() Me.Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button2.Click matematicas.show() Me.Close() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button4.Click
  • 4. videos.show() Me.Close() End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button6.Click System.Diagnostics.Process.Start("C:manualmanual.pdf") End SubEnd ClassPANTALLA DE ACTIVIDADES LENGUA Y LITERATURAPublic Class lenguaje Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click
  • 5. inicio.Show() Me.Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button2.Click abc.show() Me.Close() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click ahorcado.Show() Me.Hide() End SubEnd Class
  • 6. PANTALLA ESCUHA Y ACIERTAPublic Class abc Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles PictureBox1.Click End Sub Public Sub numeros(ByVal i) If (i = 1) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosA.wav" reproductor.Play()
  • 7. ElseIf (i = 2) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosB.wav" reproductor.Play()ElseIf (i = 3) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosC.wav" reproductor.Play()ElseIf (i = 4) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosD.wav" reproductor.Play()ElseIf (i = 5) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosE.wav" reproductor.Play()ElseIf (i = 6) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosF.wav" reproductor.Play()ElseIf (i = 7) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosG.wav"
  • 8. reproductor.Play()ElseIf (i = 8) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosH.wav" reproductor.Play()ElseIf (i = 9) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosI.wav" reproductor.Play()ElseIf (i = 10) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosJ.wav" reproductor.Play()ElseIf (i = 11) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosK.wav" reproductor.Play()ElseIf (i = 12) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosL.wav" reproductor.Play()ElseIf (i = 13) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosM.wav" reproductor.Play()
  • 9. ElseIf (i = 14) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosN.wav" reproductor.Play()ElseIf (i = 15) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosO.wav" reproductor.Play()ElseIf (i = 16) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosP.wav" reproductor.Play()ElseIf (i = 17) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosQ.wav" reproductor.Play()ElseIf (i = 18) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosR.wav" reproductor.Play()ElseIf (i = 19) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosS.wav" reproductor.Play()ElseIf (i = 20) Then
  • 10. Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosT.wav" reproductor.Play()ElseIf (i = 21) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosU.wav" reproductor.Play()ElseIf (i = 22) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosV.wav" reproductor.Play()ElseIf (i = 23) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosW.wav" reproductor.Play()ElseIf (i = 24) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosX.wav" reproductor.Play()ElseIf (i = 25) Then Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosY.wav" reproductor.Play()ElseIf (i = 26) Then
  • 11. Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosZ.wav" reproductor.Play() End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button2.Click Dim Random As New Random() Dim i As Integer = Random.Next(1, 26) numeros(i) End Sub Private Sub Button11_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button11.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosA.wav" reproductor.Play() End Sub Private Sub Button26_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button26.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosB.wav" reproductor.Play() End Sub
  • 12. Private Sub Button25_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button25.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosC.wav" reproductor.Play() End Sub Private Sub Button24_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button24.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosD.wav" reproductor.Play() End Sub Private Sub Button23_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button23.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosE.wav" reproductor.Play() End Sub Private Sub Button22_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button22.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosF.wav" reproductor.Play()
  • 13. End Sub Private Sub Button21_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button21.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosG.wav" reproductor.Play() End Sub Private Sub Button20_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button20.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosH.wav" reproductor.Play() End Sub Private Sub Button19_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button19.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosI.wav" reproductor.Play() End Sub Private Sub Button18_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button18.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosJ.wav"
  • 14. reproductor.Play() End Sub Private Sub Button17_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button17.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosK.wav" reproductor.Play() End Sub Private Sub Button16_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button16.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosL.wav" reproductor.Play() End Sub Private Sub Button15_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button15.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosM.wav" reproductor.Play() End Sub Private Sub Button14_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button14.Click Dim reproductor As New System.Media.SoundPlayer
  • 15. reproductor.SoundLocation = "sonidosN.wav" reproductor.Play() End Sub Private Sub Button13_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button13.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosO.wav" reproductor.Play() End Sub Private Sub Button12_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button12.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosP.wav" reproductor.Play() End Sub Private Sub Button30_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button30.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosQ.wav" reproductor.Play() End Sub Private Sub Button29_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button29.Click
  • 16. Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosR.wav" reproductor.Play() End Sub Private Sub Button28_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button28.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosS.wav" reproductor.Play() End Sub Private Sub Button27_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button27.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosT.wav" reproductor.Play() End Sub Private Sub Button35_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button35.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosU.wav" reproductor.Play() End Sub
  • 17. Private Sub Button34_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button34.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosV.wav" reproductor.Play() End Sub Private Sub Button33_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button33.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosW.wav" reproductor.Play() End Sub Private Sub Button32_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button32.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosX.wav" reproductor.Play() End Sub Private Sub Button31_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button31.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosY.wav" reproductor.Play() End Sub
  • 18. Private Sub Button36_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button36.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosZ.wav" reproductor.Play() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click lenguaje.Show() Me.Close() End Sub Private Sub abc_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load End SubEnd Class
  • 19. PANTALLA EL AHORCADO<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>_Partial Class ahorcado Inherits System.Windows.Forms.Form Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally
  • 20. MyBase.Dispose(disposing) End Try End Sub Required by the Windows Form Designer Private components As System.ComponentModel.IContainer NOTE: The following procedure is required by the Windows FormDesigner It can be modified using the Windows Form Designer. Do not modify it using the code editor. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Dim resources AsSystem.ComponentModel.ComponentResourceManager = NewSystem.ComponentModel.ComponentResourceManager(GetType(ahorcado)) Me.PictureBox1 = New System.Windows.Forms.PictureBox() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Button1 = New System.Windows.Forms.Button() Me.Label1 = New System.Windows.Forms.Label() Me.ComboBox1 = New System.Windows.Forms.ComboBox() Me.PictureBox2 = New System.Windows.Forms.PictureBox()
  • 21. Me.PictureBox4 = New System.Windows.Forms.PictureBox() Me.PictureBox5 = New System.Windows.Forms.PictureBox() CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox2,System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox4,System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox5,System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() PictureBox1 Me.PictureBox1.Image =CType(resources.GetObject("PictureBox1.Image"),System.Drawing.Image) Me.PictureBox1.Location = New System.Drawing.Point(549, 111) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(169, 219) Me.PictureBox1.TabIndex = 17 Me.PictureBox1.TabStop = False Label3
  • 22. Me.Label3.AutoSize = True Me.Label3.BackColor =System.Drawing.SystemColors.ControlLightLight Me.Label3.Font = New System.Drawing.Font("Arial", 20.25!,System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,CType(0, Byte)) Me.Label3.Location = New System.Drawing.Point(528, 65) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(217, 32) Me.Label3.TabIndex = 16 Me.Label3.Text = "EL AHORCADO" Label2 Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(474, 212) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(0, 13) Me.Label2.TabIndex = 15 Me.Label2.Visible = False Button1
  • 23. Me.Button1.BackColor =System.Drawing.SystemColors.ActiveCaption Me.Button1.Font = New System.Drawing.Font("Arial", 9.75!,System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,CType(0, Byte)) Me.Button1.Location = New System.Drawing.Point(618, 398) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(74, 32) Me.Button1.TabIndex = 14 Me.Button1.Text = "ENTRAR" Me.Button1.UseVisualStyleBackColor = False Label1 Me.Label1.AutoSize = True Me.Label1.Font = New System.Drawing.Font("Arial", 9.75!,System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,CType(0, Byte)) Me.Label1.Location = New System.Drawing.Point(513, 355) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(67, 16) Me.Label1.TabIndex = 13 Me.Label1.Text = "Opciones"
  • 24. ComboBox1 Me.ComboBox1.Font = New System.Drawing.Font("Arial", 9.0!,System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,CType(0, Byte)) Me.ComboBox1.FormattingEnabled = True Me.ComboBox1.Location = New System.Drawing.Point(589, 352) Me.ComboBox1.Name = "ComboBox1" Me.ComboBox1.Size = New System.Drawing.Size(144, 23) Me.ComboBox1.TabIndex = 12 Me.ComboBox1.Text = "ELIJA SU CATEGORIA" PictureBox2 Me.PictureBox2.Image =CType(resources.GetObject("PictureBox2.Image"),System.Drawing.Image) Me.PictureBox2.Location = New System.Drawing.Point(707, 398) Me.PictureBox2.Name = "PictureBox2" Me.PictureBox2.Size = New System.Drawing.Size(38, 42) Me.PictureBox2.TabIndex = 18 Me.PictureBox2.TabStop = False PictureBox4
  • 25. Me.PictureBox4.Image =CType(resources.GetObject("PictureBox4.Image"),System.Drawing.Image) Me.PictureBox4.Location = New System.Drawing.Point(670, 460) Me.PictureBox4.Name = "PictureBox4" Me.PictureBox4.Size = New System.Drawing.Size(102, 90) Me.PictureBox4.TabIndex = 20 Me.PictureBox4.TabStop = False PictureBox5 Me.PictureBox5.Image =CType(resources.GetObject("PictureBox5.Image"),System.Drawing.Image) Me.PictureBox5.Location = New System.Drawing.Point(-76, -34) Me.PictureBox5.Name = "PictureBox5" Me.PictureBox5.Size = New System.Drawing.Size(570, 624) Me.PictureBox5.TabIndex = 21 Me.PictureBox5.TabStop = False ahorcado
  • 26. Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!,13.0!) Me.AutoScaleMode =System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.SystemColors.ControlLightLight Me.ClientSize = New System.Drawing.Size(784, 562) Me.Controls.Add(Me.PictureBox5) Me.Controls.Add(Me.PictureBox2) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.ComboBox1) Me.Controls.Add(Me.PictureBox4) Me.Icon = CType(resources.GetObject("$this.Icon"),System.Drawing.Icon) Me.Name = "ahorcado" Me.StartPosition =System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "ahorcado" CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PictureBox2,System.ComponentModel.ISupportInitialize).EndInit()
  • 27. CType(Me.PictureBox4,System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PictureBox5,System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents PictureBox1 AsSystem.Windows.Forms.PictureBox Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents ComboBox1 AsSystem.Windows.Forms.ComboBox Friend WithEvents PictureBox2 AsSystem.Windows.Forms.PictureBox Friend WithEvents PictureBox4 AsSystem.Windows.Forms.PictureBox Friend WithEvents PictureBox5 AsSystem.Windows.Forms.PictureBoxEnd Class
  • 28. PANTALLA JUEGOPublic Class juego Public opcionpais(11) As String Public opcionanimal(11) As String Muy Claro Public opcionfrutas(11) As String Public i As Integer Public secreta As String Public adivina As String Public cont1 As Integer Public fallos As Integer Public termino As String Private Sub juego_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load
  • 29. aka muy importante a Lcategoria2 y tiene la Propiedad de InvisibleLe paso el valos de LCategoria de mi Form1 esto es muy importante puesto knesecito saber k opcion eligio de mi CSelceccion para poder trabajar Label1.Text = ahorcado.Label2.Text opcionpais(0) = "chile" opcionpais(1) = "uruguay" opcionpais(2) = "paraguay" Asigno 5 valores a opcionpais opcionpais(3) = "brazil" opcionpais(4) = "argentina" opcionpais(5) = "alemania" opcionpais(6) = "albania" opcionpais(7) = "peru" opcionpais(8) = "guatemala" opcionpais(9) = "salvador" opcionpais(10) = "canada" opcionanimal(0) = "zorro" opcionanimal(1) = "jirafa" opcionanimal(2) = "bufalo" Lo mismo a opcionanimal
  • 30. opcionanimal(3) = "cocodrilo" opcionanimal(4) = "aguila" opcionanimal(5) = "turpial" opcionanimal(6) = "buho" opcionanimal(7) = "canario" opcionanimal(8) = "lagartija" opcionanimal(9) = "tuqueque" opcionanimal(10) = "conejo" opcionfrutas(0) = "naranja" opcionfrutas(1) = "kiwi" opcionfrutas(2) = "mango" = a opcionfrutas opcionfrutas(3) = "banana" opcionfrutas(4) = "patilla" opcionfrutas(5) = "fresa" opcionfrutas(6) = "guanabana" opcionfrutas(7) = "melon" opcionfrutas(8) = "manzana" opcionfrutas(9) = "pera" opcionfrutas(10) = "tamarindo"End Sub
  • 31. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click PictureBox13.Visible = True Button2.Visible = True TextBox1.Visible = True tamaño variable k se okupara para imprimir en pantalla el largo de la cadena--> Len(opcion....(i)) Dim tamaño As Integer Si LCategoria2, k no olvidemos tiene el valor de LCategoria del Form1 es == a Paises se generara una palabra al azar entre las 5 opciones deopcionpais If Label1.Text = "Paises" Then Randomize() funcion k genera palabra al azar Do hacemos i = CInt(Rnd() * 10) convertir a i a entero(CInt) ya k Rnd nos devuevleun decimal Loop While (i > 11) mientras i(=0) sea menor a 4 secreta = (opcionpais(i)) le asignamos a secreta el resultado de lapalabra al zar tamaño = Len(opcionpais(i)) asignamos a tamaño un valor entero k serael largo de la cadena Label2.Text = secreta imprimimos la palabra secreta Button2.Enabled = True abilitamos el botton1 ya k inicialmente estadesabilitado Label3.Text = "Pais" Imprimimos pais Label4.Text = tamaño & " " & "Letras" imprimimos el tamaño End If
  • 32. lo mismo con animales If Label1.Text = "Animales" Then Randomize() funcion k genera palabra al azar Do hacemos i = CInt(Rnd() * 10) convertir a i a entero(CInt) ya k Rnd nos devuevleun decimal Loop While (i > 11) mientras i(=0) sea menor a 4 secreta = (opcionanimal(i)) le asignamos a secreta el resultado de lapalabra al zar tamaño = Len(opcionanimal(i)) asignamos a tamaño un valor entero ksera el largo de la cadena Label2.Text = secreta imprimimos la palabra secreta Button2.Enabled = True abilitamos el botton1 ya k inicialmente estadesabilitado Label3.Text = "Animal" Imprimimos pais Label4.Text = tamaño & " " & "Letras" imprimimos el tamaño End If lo mismo con frutas If Label1.Text = "Frutas" Then Randomize() funcion k genera palabra al azar Do hacemos i = CInt(Rnd() * 10) convertir a i a entero(CInt) ya k Rnd nos devuevleun decimal Loop While (i > 11) mientras i(=0) sea menor a 4
  • 33. secreta = (opcionfrutas(i)) le asignamos a secreta el resultado de lapalabra al zar tamaño = Len(opcionfrutas(i)) asignamos a tamaño un valor entero k serael largo de la cadena Label2.Text = secreta imprimimos la palabra secreta Button2.Enabled = True abilitamos el botton1 ya k inicialmente estadesabilitado Label3.Text = "Fruta" Imprimimos pais Label4.Text = tamaño & " " & "Letras" imprimimos el tamaño End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button2.Click Dim c As Integer kontador Dim letra As String letra Dim ContFallos As Integer kontador de intentos fallidos aka empezamos la letra k ingresamos desde teklado (TextBox) For c = 1 To Len(secreta) desde la primera hasta la ultima letra de la cadena letra = Mid(secreta, c, 1) extraemos la primera de la cadena de nuestrasopcionealogo (secreta) If letra = LCase(TextBox1.Text) Or letra = " " Then si la la letra es = a la kingresamos en Texbox1 adivina = gestor(c, letra, Len(secreta)) le pasamos nuestra letra alGestor
  • 34. cont1 = cont1 + 1 aumentamos 1 a este kontador pera terminar el juegoen caso de ganar Else adivina = adivina & " " si no espacio ContFallos = ContFallos + 1 si no lo encuentra se aumenta ContFallos End If Next If ContFallos = Len(secreta) Then aqui si el ContFallos es igual al tamaño dela palabra quiere decir que no estaba en ninguno fallos = fallos + 1 decalro ahora fallos como publico y en el guardo losfallos globales MsgBox("lleva " & fallos & " fallos") le aviso cuantos fallos lleva If TextBox1.Text = "" Then MsgBox("INGRESE UNA LETRA") fallos = 0 Else estas son las secuencias de fotografias que se mostaran segun losfallos+ xD If fallos = 1 Then PictureBox7.Visible = False PictureBox6.Visible = False PictureBox5.Visible = False
  • 35. PictureBox4.Visible = False PictureBox3.Visible = False PictureBox2.Visible = False PictureBox1.Visible = TrueEnd IfIf fallos = 2 Then PictureBox7.Visible = False PictureBox6.Visible = False PictureBox5.Visible = False PictureBox4.Visible = False PictureBox3.Visible = False PictureBox2.Visible = True PictureBox1.Visible = FalseEnd IfIf fallos = 3 Then PictureBox7.Visible = False PictureBox6.Visible = False PictureBox5.Visible = False PictureBox4.Visible = False PictureBox3.Visible = True PictureBox2.Visible = False PictureBox1.Visible = FalseEnd IfIf fallos = 4 Then PictureBox7.Visible = False
  • 36. PictureBox6.Visible = False PictureBox5.Visible = False PictureBox4.Visible = True PictureBox3.Visible = False PictureBox2.Visible = False PictureBox1.Visible = FalseEnd IfIf fallos = 5 Then PictureBox7.Visible = False PictureBox6.Visible = False PictureBox5.Visible = True PictureBox4.Visible = False PictureBox3.Visible = False PictureBox2.Visible = False PictureBox1.Visible = FalseEnd IfIf fallos = 6 Then PictureBox7.Visible = False PictureBox6.Visible = True PictureBox5.Visible = False PictureBox4.Visible = False PictureBox3.Visible = False PictureBox2.Visible = False PictureBox1.Visible = FalseEnd If
  • 37. End If End If si el cont1 es == al largo de la secreta kiere decir k ganamos y se despliegael Msg If cont1 = 0 Then Else If cont1 = Len(secreta) Then felicitaciones3.Show() End If End If Lo mismo en el caso de Perder If fallos = 6 Then Button1.Enabled = False If MsgBox("La Palabra Era " & secreta & " " & "Deseas Volver a jugar??",MsgBoxStyle.YesNo, "Perdiste") = MsgBoxResult.Yes Then Me.Close()
  • 38. ahorcado.Visible = True Else : Me.Close() ahorcado.Close() lenguaje.Show() End If End If Label5.Text = adivina TextBox1.Text = "" Label6.Text = fallos End Sub Private Function gestor(ByVal pos As String, ByVal letra As String, ByVal largoAs Integer) Nuestra funcion gestor que akomodara las letras k utilizamos en el Button1 Dim texto As String Dim x As Integer texto = "" For x = 1 To largo If x = pos Then texto = texto & letra Else texto = texto & Mid(adivina, x, 1) End If Next
  • 39. Return texto End Function Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) End Sub Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click lenguaje.Show() Me.Hide() End SubEnd ClassVENTANA DE ACTIVIDADES DE MATEMATICAPublic Class matematicas
  • 40. Private Sub PictureBox3_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles PictureBox3.Click End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles Button2.Click contar.show() Me.Close() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles Button3.Click Dim formEx As New suma() formEx.Show() Me.Hide() End Sub Private Sub Label1_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles Label1.Click End Sub
  • 41. Private Sub Button4_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles Button4.Click resta.show() Me.Close() End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles Button6.Click multiplicacion.show() Me.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles Button1.Click inicio.Show() Me.Close() End SubEnd ClassPublic Class felicitaciones
  • 42. Private Sub Button3_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles Button3.Click Me.Hide() End SubEnd ClassPublic Class incorrecto Private Sub Button3_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles Button3.Click Me.Hide() End SubEnd ClassPANTALLA CONTAR
  • 43. Public Class contar Dim a As String = "imagenespelota.gif" Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidos1.wav" reproductor.Play() limpiar() PictureBox5.ImageLocation = a End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button2.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidos2.wav" reproductor.Play() limpiar() PictureBox3.ImageLocation = a PictureBox7.ImageLocation = a End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidos3.wav"
  • 44. reproductor.Play() limpiar() PictureBox1.ImageLocation = a PictureBox5.ImageLocation = a PictureBox9.ImageLocation = a End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button4.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidos4.wav" reproductor.Play() limpiar() PictureBox1.ImageLocation = a PictureBox3.ImageLocation = a PictureBox7.ImageLocation = a PictureBox9.ImageLocation = a End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button5.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidos5.wav" reproductor.Play() limpiar() PictureBox1.ImageLocation = a
  • 45. PictureBox3.ImageLocation = a PictureBox5.ImageLocation = a PictureBox7.ImageLocation = a PictureBox9.ImageLocation = a End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button6.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidos6.wav" reproductor.Play() limpiar() PictureBox1.ImageLocation = a PictureBox4.ImageLocation = a PictureBox7.ImageLocation = a PictureBox3.ImageLocation = a PictureBox6.ImageLocation = a PictureBox9.ImageLocation = a End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button7.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidos7.wav" reproductor.Play() limpiar()
  • 46. PictureBox1.ImageLocation = a PictureBox2.ImageLocation = a PictureBox3.ImageLocation = a PictureBox5.ImageLocation = a PictureBox7.ImageLocation = a PictureBox8.ImageLocation = a PictureBox9.ImageLocation = a End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button8.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidos8.wav" reproductor.Play() limpiar() PictureBox1.ImageLocation = a PictureBox2.ImageLocation = a PictureBox3.ImageLocation = a PictureBox4.ImageLocation = a PictureBox6.ImageLocation = a PictureBox7.ImageLocation = a PictureBox8.ImageLocation = a PictureBox9.ImageLocation = a End Sub
  • 47. Private Sub Button9_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button9.Click Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidos9.wav" reproductor.Play() limpiar() PictureBox1.ImageLocation = a PictureBox2.ImageLocation = a PictureBox3.ImageLocation = a PictureBox4.ImageLocation = a PictureBox5.ImageLocation = a PictureBox6.ImageLocation = a PictureBox7.ImageLocation = a PictureBox8.ImageLocation = a PictureBox9.ImageLocation = a End Sub Private Sub limpiar() PictureBox1.ImageLocation = "" PictureBox2.ImageLocation = "" PictureBox3.ImageLocation = "" PictureBox4.ImageLocation = "" PictureBox5.ImageLocation = "" PictureBox6.ImageLocation = "" PictureBox7.ImageLocation = ""
  • 48. PictureBox8.ImageLocation = "" PictureBox9.ImageLocation = "" End Sub Private Sub Button10_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button10.Click matematicas.Show() Me.Close() End SubEnd ClassPANTALLA SUMA
  • 49. Public Class suma Dim j As Integer = 0 Dim c As Integer = 0 Private Sub suma_Load( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) start() End Sub Private Sub suma_Load_1(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load start() End Sub Public Sub start() Inicializar la clase Random Dim Random As New Random() If (j = 20) Then matematicas.Show() Dim a As Integer a = CStr(c * 2) matematicas.Label1.Text = a Me.Hide()
  • 50. Else generar un random entre 1 y 100 Dim i As Integer = Random.Next(1, 20) Dim a As Integer Dim b As Integer a = CStr(c) b = CStr(c * 2) numeros(i) j=j+1 TextBox3.Text = "" End IfEnd SubPublic Sub numeros(ByVal i) If (i = 1) Then Label3.Text = "10" Label4.Text = "5" ElseIf (i = 2) Then Label3.Text = "6" Label4.Text = "2" ElseIf (i = 3) Then Label3.Text = "5" Label4.Text = "2"
  • 51. ElseIf (i = 4) Then Label3.Text = "8" Label4.Text = "3"ElseIf (i = 5) Then Label3.Text = "3" Label4.Text = "3"ElseIf (i = 6) Then Label3.Text = "9" Label4.Text = "6"ElseIf (i = 7) Then Label3.Text = "8" Label4.Text = "4"ElseIf (i = 8) Then Label3.Text = "4" Label4.Text = "3"ElseIf (i = 9) Then Label3.Text = "10" Label4.Text = "7"ElseIf (i = 10) Then Label3.Text = "2" Label4.Text = "1"ElseIf (i = 11) Then Label3.Text = "10" Label4.Text = "9"
  • 52. ElseIf (i = 12) Then Label3.Text = "15" Label4.Text = "2"ElseIf (i = 13) Then Label3.Text = "7" Label4.Text = "3"ElseIf (i = 14) Then Label3.Text = "14" Label4.Text = "2"ElseIf (i = 15) Then Label3.Text = "18" Label4.Text = "4"ElseIf (i = 16) Then Label3.Text = "20" Label4.Text = "4"ElseIf (i = 17) Then Label3.Text = "17" Label4.Text = "3"ElseIf (i = 18) Then Label3.Text = "8" Label4.Text = "7"ElseIf (i = 19) Then Label3.Text = "6" Label4.Text = "1"ElseIf (i = 20) Then
  • 53. Label3.Text = "5" Label4.Text = "5" End If End Sub Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click Me.Select() Dim a As Integer Dim b As Integer If (Not Integer.TryParse(TextBox3.Text, b)) Then MsgBox("INGRESE UN VALOR") TextBox3.Focus() Exit Sub End If If (Not Integer.TryParse(Label3.Text, a)) Then
  • 54. MsgBox("Se require un entero") Label3.Focus() Exit SubEnd IfIf (Not Integer.TryParse(Label4.Text, b)) Then MsgBox("Se require un entero") Label4.Focus() Exit SubEnd IfIf TextBox3.Text = CStr(a + b) Then felicitaciones.show() Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosfelicitaciones2.wav" reproductor.Play() start() Dim formEx As New matematicas() c=c+1 start()Else incorrecto.Show() Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosincorrecto.wav" reproductor.Play()
  • 55. start() End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click Dim formEx As New matematicas() formEx.Show() Me.Close() End SubEnd ClassPANTALLA DE RESTA
  • 56. Public Class resta Dim j As Integer = 0 Dim c As Integer = 0 Private Sub resta_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load start() End Sub Public Sub start() Inicializar la clase Random Dim Random As New Random() If (j = 20) Then matematicas.Show() Dim b As Integer b = CStr(c * 2) Me.Hide() Else
  • 57. generar un random entre 1 y 100 Dim i As Integer = Random.Next(1, 20) Dim a As Integer Dim b As Integer a = CStr(c) b = CStr(c * 2) numeros(i) j=j+1 TextBox3.Text = "" End IfEnd SubPublic Sub numeros(ByVal i) If (i = 1) Then Label3.Text = "10" Label4.Text = "5" ElseIf (i = 2) Then Label3.Text = "6" Label4.Text = "2" ElseIf (i = 3) Then Label3.Text = "5" Label4.Text = "2" ElseIf (i = 4) Then
  • 58. Label3.Text = "8" Label4.Text = "3"ElseIf (i = 5) Then Label3.Text = "3" Label4.Text = "3"ElseIf (i = 6) Then Label3.Text = "9" Label4.Text = "6"ElseIf (i = 7) Then Label3.Text = "8" Label4.Text = "4"ElseIf (i = 8) Then Label3.Text = "4" Label4.Text = "3"ElseIf (i = 9) Then Label3.Text = "10" Label4.Text = "7"ElseIf (i = 10) Then Label3.Text = "2" Label4.Text = "1"ElseIf (i = 11) Then Label3.Text = "10" Label4.Text = "9"ElseIf (i = 12) Then
  • 59. Label3.Text = "15" Label4.Text = "2"ElseIf (i = 13) Then Label3.Text = "7" Label4.Text = "3"ElseIf (i = 14) Then Label3.Text = "14" Label4.Text = "2"ElseIf (i = 15) Then Label3.Text = "18" Label4.Text = "4"ElseIf (i = 16) Then Label3.Text = "20" Label4.Text = "4"ElseIf (i = 17) Then Label3.Text = "17" Label4.Text = "3"ElseIf (i = 18) Then Label3.Text = "8" Label4.Text = "7"ElseIf (i = 19) Then Label3.Text = "6" Label4.Text = "1"ElseIf (i = 20) Then Label3.Text = "5"
  • 60. Label4.Text = "5" End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click Dim a As Integer Dim b As Integer If (Not Integer.TryParse(Label3.Text, b)) Then MsgBox("INGRESE UN VALOR") TextBox3.Focus() Exit Sub End If If (Not Integer.TryParse(Label3.Text, a)) Then MsgBox("Se require un entero") TextBox3.Focus() Exit Sub End If If (Not Integer.TryParse(Label4.Text, b)) Then MsgBox("Se require un entero") Label4.Focus() Exit Sub End If
  • 61. If TextBox3.Text = CStr(a - b) Then felicitaciones.Show() Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosfelicitaciones2.wav" reproductor.Play() Dim formEx As New matematicas() c=c+1 start() Else incorrecto.Show() Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosincorrecto.wav" reproductor.Play() start() End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click Dim formEx As New matematicas() formEx.Show() Me.Close()
  • 62. End SubEnd ClassPANTALLA DE MULTIPLICACIONPublic Class multiplicacion Dim j As Integer = 0 Dim c As Integer = 0 Private Sub multiplicacion_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load start() End Sub
  • 63. Public Sub start() Inicializar la clase Random Dim Random As New Random() If (j = 20) Then matematicas.Show() Dim b As Integer b = CStr(c * 2) Me.Hide() Else generar un random entre 1 y 100 Dim i As Integer = Random.Next(1, 20) Dim a As Integer Dim b As Integer a = CStr(c) b = CStr(c * 2) numeros(i) j=j+1 TextBox3.Text = "" End If
  • 64. End SubPublic Sub numeros(ByVal i) If (i = 1) Then Label3.Text = "10" Label4.Text = "5" ElseIf (i = 2) Then Label3.Text = "6" Label4.Text = "2" ElseIf (i = 3) Then Label3.Text = "5" Label4.Text = "2" ElseIf (i = 4) Then Label3.Text = "8" Label4.Text = "3" ElseIf (i = 5) Then Label3.Text = "3" Label4.Text = "3" ElseIf (i = 6) Then Label3.Text = "9" Label4.Text = "6" ElseIf (i = 7) Then Label3.Text = "8" Label4.Text = "4" ElseIf (i = 8) Then
  • 65. Label3.Text = "4" Label4.Text = "3"ElseIf (i = 9) Then Label3.Text = "2" Label4.Text = "7"ElseIf (i = 10) Then Label3.Text = "2" Label4.Text = "1"ElseIf (i = 11) Then Label3.Text = "5" Label4.Text = "9"ElseIf (i = 12) Then Label3.Text = "15" Label4.Text = "2"ElseIf (i = 13) Then Label3.Text = "7" Label4.Text = "3"ElseIf (i = 14) Then Label3.Text = "14" Label4.Text = "2"ElseIf (i = 15) Then Label3.Text = "8" Label4.Text = "4"ElseIf (i = 16) Then
  • 66. Label3.Text = "6" Label4.Text = "4" ElseIf (i = 17) Then Label3.Text = "1" Label4.Text = "3" ElseIf (i = 18) Then Label3.Text = "3" Label4.Text = "7" ElseIf (i = 19) Then Label3.Text = "6" Label4.Text = "1" ElseIf (i = 20) Then Label3.Text = "5" Label4.Text = "5" End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click Dim a As Integer Dim b As Integer If (Not Integer.TryParse(Label3.Text, b)) Then MsgBox("INGRESE UN VALOR")
  • 67. TextBox3.Focus() Exit SubEnd IfIf (Not Integer.TryParse(Label3.Text, a)) Then MsgBox("Se require un entero") TextBox3.Focus() Exit SubEnd IfIf (Not Integer.TryParse(Label4.Text, b)) Then MsgBox("Se require un entero") Label4.Focus() Exit SubEnd IfIf TextBox3.Text = CStr(a * b) Then felicitaciones.Show() Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosfelicitaciones2.wav" reproductor.Play() Dim formEx As New matematicas() c=c+1 start()Else
  • 68. incorrecto.Show() Dim reproductor As New System.Media.SoundPlayer reproductor.SoundLocation = "sonidosincorrecto.wav" reproductor.Play() start() End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click Dim formEx As New matematicas() formEx.Show() Me.Close() End SubEnd Class
  • 69. VENTANA DE ESTRATEGIASPublic Class estrategias Private Sub Button1_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles Button1.Click inicio.Show() Me.Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles Button2.Click ordena.Show()
  • 70. Me.Close() End SubEnd ClassPANTALLA ORDENA Y APRENDEPublic Class ordena Private Sub restablecer_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button11.Click Me.Button1.Text = 2 Me.Button2.Text = 4 Me.Button3.Text = 5 Me.Button4.Text = 3 Me.Button5.Text = 7
  • 71. Me.Button6.Text = 6 Me.Button7.Text = 9 Me.Button8.Text = 8 Me.Button9.Text = 1 Me.Button10.Text = "" End Sub Private Sub todosbotones_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click, Button2.Click, Button3.Click,Button4.Click, Button5.Click, Button6.Click, Button7.Click, Button8.Click,Button9.Click, Button10.Click Dim btnvacio As New Button Dim presionado As New Button Dim correcto As Boolean presionado = sender boton presionado btnvacio = vacio() boton vacio correcto = ganar() evitando saltos de lado a lado ejemplo: que del 1 se pase al 3 If sender Is Me.Button6 And btnvacio Is Me.Button10 Then Exit Sub If sender Is Me.Button10 And btnvacio Is Me.Button6 Then Exit Sub If sender Is Me.Button1 And btnvacio Is Me.Button5 Then Exit Sub If sender Is Me.Button5 And btnvacio Is Me.Button1 Then Exit Sub ************************boton 1************************
  • 72. If sender Is Me.Button1 Then If btnvacio Is Me.Button2 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button6 Then btnvacio.Text = sender.text sender.text = "" ganar() End IfEnd If************************boton 2************************If sender Is Me.Button2 Then If btnvacio Is Me.Button1 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button3 Then btnvacio.Text = sender.text sender.text = ""
  • 73. ganar() End If If btnvacio Is Me.Button7 Then btnvacio.Text = sender.text sender.text = "" ganar() End IfEnd If************************boton 3************************If sender Is Me.Button3 Then If btnvacio Is Me.Button2 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button4 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button8 Then btnvacio.Text = sender.text sender.text = ""
  • 74. ganar() End IfEnd If************************boton 4************************If sender Is Me.Button4 Then If btnvacio Is Me.Button3 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button5 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button9 Then btnvacio.Text = sender.text sender.text = "" ganar() End IfEnd If************************boton 5************************If sender Is Me.Button5 Then If btnvacio Is Me.Button4 Then btnvacio.Text = sender.text
  • 75. sender.text = "" ganar() End If If btnvacio Is Me.Button10 Then btnvacio.Text = sender.text sender.text = "" ganar() End IfEnd If************************boton 6************************If sender Is Me.Button6 Then If btnvacio Is Me.Button1 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button7 Then btnvacio.Text = sender.text sender.text = "" ganar() End IfEnd If
  • 76. ************************boton 7************************If sender Is Me.Button7 Then If btnvacio Is Me.Button2 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button6 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button8 Then btnvacio.Text = sender.text sender.text = "" ganar() End IfEnd If************************boton 8************************If sender Is Me.Button8 Then If btnvacio Is Me.Button3 Then btnvacio.Text = sender.text
  • 77. sender.text = "" ganar() End If If btnvacio Is Me.Button7 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button9 Then btnvacio.Text = sender.text sender.text = "" ganar() End IfEnd If************************boton 9************************If sender Is Me.Button9 Then If btnvacio Is Me.Button4 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button8 Then btnvacio.Text = sender.text
  • 78. sender.text = "" ganar() End If If btnvacio Is Me.Button10 Then btnvacio.Text = sender.text sender.text = "" ganar() End IfEnd If************************boton 10************************If sender Is Me.Button10 Then If btnvacio Is Me.Button5 Then btnvacio.Text = sender.text sender.text = "" ganar() End If If btnvacio Is Me.Button9 Then btnvacio.Text = sender.text sender.text = "" ganar() End IfEnd If
  • 79. If correcto = True Then MsgBobtnvacio("Orden Correcto", MsgBobtnvacioStyle.Information,"Felicidades") exit Sub End If End Sub Public Function vacio() As Button If Me.Button1.Text = "" Then Return Button1 End If If Me.Button2.Text = "" Then Return Button2 End If If Me.Button3.Text = "" Then Return Button3 End If If Me.Button4.Text = "" Then Return Button4 End If If Me.Button5.Text = "" Then Return Button5 End If If Me.Button6.Text = "" Then Return Button6 End If
  • 80. If Me.Button7.Text = "" Then Return Button7 End If If Me.Button8.Text = "" Then Return Button8 End If If Me.Button9.Text = "" Then Return Button9 End If If Me.Button10.Text = "" Then Return Button10 End If Return Nothing End Function Public Sub ganar() If Me.Button1.Text = "1" And Me.Button2.Text = "2" And Me.Button3.Text ="3" And Me.Button4.Text = "4" And Me.Button5.Text = "5" And Me.Button6.Text ="6" And Me.Button7.Text = "7" And Me.Button8.Text = "8" And Me.Button9.Text ="9" Then felicitaciones2.Show() End If End Sub
  • 81. Private Sub Button13_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button13.Click estrategias.Show() Me.Close() End SubEnd ClassVENTANA DE VIDEOSPublic Class videos Private Sub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button2.Click
  • 82. If ComboBox1.Text = "Las Computadoras" Then video1.Show() Me.Hide()End IfIf ComboBox1.Text = "El ciclo del agua" Then video2.Show() Me.Hide()End IfIf ComboBox1.Text = "Educacion para la Sexualidad" Then video3.Show() Me.Hide()End IfIf ComboBox1.Text = "Los Dinosaurios" Then video4.Show() Me.Hide()End IfIf ComboBox1.Text = "Lavarse los Dientes" Then video5.Show() Me.Hide()End IfIf ComboBox1.Text = "Cuerpos Geometricos" Then video6.Show() Me.Hide()End If
  • 83. If ComboBox1.Text = "Anatomia Sistema Digestivo" Then video7.Show() Me.Hide() End If If ComboBox1.Text = "Ditongo" Then video8.Show() Me.Hide() End If If ComboBox1.Text = "Fluvi cuida el Agua" Then video9.Show() Me.Hide() End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click inicio.Show() Me.Close() End SubEnd ClassVIDEO 1Public Class video1
  • 84. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click videos.Show() Me.Close() End SubEnd ClassVIDEO 2Public Class video2 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click videos.Show() Me.Close() End SubEnd ClassVIDEO 3Public Class video3 Private Sub ToolTip1_Popup(ByVal sender As System.Object, ByVal e AsSystem.Windows.Forms.PopupEventArgs) Handles ToolTip1.Popup End Sub
  • 85. Private Sub AxWindowsMediaPlayer1_Enter(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles AxWindowsMediaPlayer1.Enter End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click videos.Show() Me.Close() End SubEnd ClassVIDEO 4Public Class video2 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click videos.Show() Me.Close() End SubEnd ClassVIDEO 5Public Class video5
  • 86. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click videos.Show() Me.Close() End SubEnd ClassVIDEO 6Public Class video6 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click videos.Show() Me.Close() End SubEnd ClassVIDEO 7Public Class video7 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click videos.Show()
  • 87. Me.Close() End SubEnd ClassVIDEO 8Public Class video8 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click videos.Show() Me.Close() End SubEnd ClassVIDEO 9Public Class video9 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click videos.Show() Me.Close() End SubEnd Class