Sunteți pe pagina 1din 31

SEGUNDO PERIODO

AHORCADO

Primero vamos al men inicio

Luego todo los programas

Luego Microsoft visual Studio 6.0

Y a continuacin le damos clic en visual Basic y se abrir el programa

Y le damos en EXE estndar y abrir

Y empezamos primero tenemos que escoger los text box

Al hacer esto tenemos que tener en Cuentacuentos text box hay que hacer en la nuestra tuvimos que hacer 8 labels

Luego hacemos un dibujo para esto utilizamos los shapes que se encuentra en la barra de componentes con el cual haremos la cabeza del mueco

Luego haremos el cuerpo del mueco con los line que se encuentra en la barra de componentes

Luego hacemos unos command

Luego de haber hecho los command los nombramos

Private 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 vaca Else Adodc1.Recordset.MovePrevious If Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst End If End Sub El del command siguiente cuyo codigo es Select 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 = True Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End If

Ahora tenemos el command anterior cuyo cdigo Ser el siguiente

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 If Case 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

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

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

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

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

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

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

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

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

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 If End Select End sub.

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.

Pero hasta este momento todava no funciona. Lo que haremos es abrir una conexin 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

Al hacer esto se despliega una venta y le damos en la opcin usar cadena de conexin y luego generar

Y se desplegara otra ventana en donde nos pide seleccionar un proveedor en esta caso utilizamer el Microsoft jet 4.0

Luego en siguiente y nos lleva a la pestaa conexin hay seleccionamos la ubicacin de la base de datos

Y luego de darle aceptar volvemos a la ventana pagina de propiedades y vamos a la pestaa origen de registro y desplegamos la opcin que dice tipo de comando y le damos en table

Luego desplegamos la opcin tabla o nombre de procedimiento almacenado el nombre de la tabla

Luego seleccionamos el mueco y le damos en propiedades y buscamos la opcin visible y le ponemos false

S-ar putea să vă placă și