31
SEGUNDO PERIODO

Ahorcado

Embed Size (px)

Citation preview

Page 1: Ahorcado

SEGUNDO PERIODO

Page 2: Ahorcado

AHORCADO

• Primero vamos al menú inicio

Page 3: Ahorcado

Luego todo los programas

Page 4: Ahorcado

Luego Microsoft visual Studio 6.0

Page 5: Ahorcado

Y a continuación le damos clic en visual Basic y se abrir el programa

Page 6: Ahorcado

Y le damos en EXE estándar y abrir

Page 7: Ahorcado

Y empezamos primero tenemos que escoger los text box

Page 8: Ahorcado

Al hacer esto tenemos que tener en Cuentacuentos text box

hay que hacer en la nuestra tuvimos

que hacer 8 labels

Page 9: Ahorcado

Luego hacemos un dibujo para esto utilizamos los shapes que se

encuentra en la barra de componentes con el cual haremos

la cabeza del muñeco

Page 10: Ahorcado

Luego haremos el cuerpo del muñeco con los line que se

encuentra en la barra de componentes

Page 11: Ahorcado

Luego hacemos unos command

Page 12: Ahorcado

Luego de haber hecho los command los nombramos

Page 13: Ahorcado

Ahora tenemos el command anterior cuyo código Será el

siguientePrivate Sub Command5_Click()If Adodc1.Recordset.EOF And Adodc1.Recordset.BOF Then MsgBox "No hay registros en la base de datos", vbExclamation, "Base de datos vacíaElse Adodc1.Recordset.MovePrevious If Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst End IfEnd SubEl del command siguiente cuyo codigo esSelect Case No.Text Case 1 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else L1.Visible = TrueAdodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If

Page 14: Ahorcado

Case 2 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else L2.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End IfCase 3 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else L3.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If

Page 15: Ahorcado

Case 4 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else L4.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If Case 5 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else L5.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If

Page 16: Ahorcado

Case 6 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else L6.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If Case 7 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else L7.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If

Page 17: Ahorcado

Case 8 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else L8.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If Case 9 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else L9.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If

Page 18: Ahorcado

Case 10 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else L10.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If Case 11 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else Line11.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If

Page 19: Ahorcado

Case 12 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else Line12.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If Case 13 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else Line13.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If

Page 20: Ahorcado

Case 14 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast MsgBox ("EL JUEGO HA TERMINADO") End End If Else Line14.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast MsgBox ("EL JUEGO HA TERMINADO") End End If End If Case 15 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If MsgBox ("EL JUEGO HA TERMINADO") End Else Line9.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast MsgBox ("EL JUEGO HA TERMINADO") End End If End If

Page 21: Ahorcado

Case 16 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else Line10.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If Case 17 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else Line17.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If

Page 22: Ahorcado

Case 18 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else Line18.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If Case 19 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else Line19.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If

Page 23: Ahorcado

Case 20 If R.Text = clave1.Text Then Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If Else Line20.Visible = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End IfEnd SelectEnd sub.

Page 24: Ahorcado

El codigo anterior funciona solo funciona con un componente cuyo

nombre es Microsoft ADO data control 6.0 (OLEDB) este

componente se encuentre en la barra de componentes.

Page 25: Ahorcado

Pero hasta este momento todavía no funciona. Lo que haremos es abrir una conexión con una base de datos la cual hicimos anterior mente. Para esto le damos clic

derecho en el componente Microsoft ADO data control 6.0

Y luego en propiedades

Page 26: Ahorcado

Al hacer esto se despliega una venta y le damos en la opción usar

cadena de conexión y luego generar

Page 27: Ahorcado

Y se desplegara otra ventana en donde nos pide seleccionar un proveedor en esta caso utilizamer

el Microsoft jet 4.0

Page 28: Ahorcado

Luego en siguiente y nos lleva a la pestaña conexión hay seleccionamos la ubicación de la

base de datos

Page 29: Ahorcado

Y luego de darle aceptar volvemos a la ventana pagina de propiedades y vamos a la pestaña

origen de registro y desplegamos la opción que dice tipo de comando y le damos en table

Page 30: Ahorcado

Luego desplegamos la opción tabla o nombre de procedimiento

almacenado el nombre de la tabla

Page 31: Ahorcado

Luego seleccionamos el muñeco y le damos en propiedades y buscamos la

opción visible y le ponemos false