UNIVERSIDAD NACIONAL AUTONOMA DE MÉXICO
2. ANÁLISIS DE SISTEMAS
8. ESPECIFICACIÓN DE PROGRAMAS
RUBROS DE EVALUACIÓN PARA LA ASIGNATURA DE INGENIERIA DE SOFTWARE.
GRUPO 2309
SEMESTRE 2025-2
INICIO SEMESTRE 27 DE ENERO DE 2025.
TÉRMINO SEMESTRE 23 DE MAYO DE 2025. (TERMINO DE CLASES)
PROFESOR: ALEJANDRO VALDEZ SANTAMARIA
La clase se llevará a cabo en horario de martes y jueves de 7:00 a 9:30 horas de la mañana.
Iniciando el Semestre el 28 de enero de 2025. Primera clase.
Se utilizara Visual Basic 6.0 y el cual podrá descargar e instalar en su ordenador antes de iniciar las clases de la siguiente URL:
https://drive.google.com/file/
(Si tiene Windows 8, 10 o 11 buscar y ver un video en YouTube para poderlo instalar, solo trabajaremos bajo ambiente Windows por favor y gracias).
La primera sesión de clase se dará a conocer la mecánica de trabajo y las rúbricas de evaluación para el semestre ( ya están abajo especificadas, pero se explicaran el primer día de clases).
Además de que la asistencia a la clase es un requisito porque se manejaran ejercicios prácticos y es indispensable asistir para que no haya atrasos en los ejercicios que uds. realizaran, así como las tareas y demás trabajos a realizar.
Si acepta los rubros de evaluación enviar un correo electrónico en donde diga que acepta los rubros de evaluación de la asignatura. (74valsan@gmail.com.
Se creó un grupo de Whatsap para facilitar la comunicación.
Se les pide a cada uno de uds, enviar respuesta de este correo electrónico 74valsan@gmail.com de recibido así como su número de celular para darlos de alta en el grupo de trabajo con el cual nos estaremos comunicando, rápidamente, gracias.
Es importante que no falten a clases desde la primera por favor.
Atentamente
El profesor
Mtro. Alejandro Valdez Santamaria.
Ver temario de la Asignatura :
RUBROS DE EVALUACION
50 % DE LA CALIFICACIÓN:
1. PROGRAMAS REALIZADOS EN CLASE.
Debe de contener su Objetivo o Propósito, Pseudocodigo, Diagrama de flujo de cada proceso, Codificacion en Visual Basic 6.0 y el ejecutable de cada programa.
2. PROGRAMAS SIMILARES PERO NO IGUALES, QUE REALIZARÁ CADA ALUMNO.
Debe de contener su Objetivo o Propósito, Pseudocodigo, Diagrama de flujo de cada proceso, Codificacion en Visual Basic 6.0 y el ejecutable de cada programa.
3. TEMARIO RESUELTO Y PUESTO EN UN BLOG (Mandar la URL)
4. CREAR UNA CARPETA EN DRIVE DE GOOGLE EN DONDE SUBIRÁN TODOS LOS PROGRAMAS Y COMPARTIRÁN ESA CARPETA CON CADA UNO DE SUS PROGRAMAS AL PROFESOR, ENVIARAN LA URL DE COMPARTICIÓN. (ESTOS PROGRAMAS SE ENTREGARÁN AL FINAL EN UN DVD O UNA MEMORIA USB, TIENE QUE INCLUIR TODO LO VISTO EN EL SEMESTRE)
5. EXPOSICIÓN DE TEMA QUE ELIGE CADA ALUMNO Y SE DARÁ A CONOCER UN MES DESPUÉS DE INICIADO EL SEMESTRE (JUEVES 27 DE FEBRERO DE 2025), LA EXPOSICIÓN SERÁ A PARTIR DEL 6 DE MAYO DE DE 2025.
50 % DE LA CALIFICACIÓN (PROYECTO):
EL CUAL CONSTARA DE LO SIGUIENTE Y SE ENTREGARÁ EN PROGRAMA FUENTE Y EJECUTABLE, FUNCIONAL Y SIN NINGÚN ERROR, BAJO LAS NORMAS DE CALIDAD DE SOFTWARE, EL PROYECTO SERÁ EN FORMA INDIVIDUAL Y SE ENTREGARÁ EL 6 DE MAYO DE 2025. (El proyecto se incluirá en el DVD o USB que se entregará al final).
LOS 21 DÍAS ANTES DE CONCLUIR EL SEMESTRE, SERÁN DESTINADOS PARA LA EXPOSICIÓN DEL TEMA QUE ELIGIÓ. (DE UNA LISTA QUE LES DARE CON ANTICIPACIÓN Y NO TIENE QUE SER REPETIBLE).
MANUAL DE PROCEDIMIENTOS:
1. LOGO
2. SLOGAN
3. OBJETIVOS
4. MISION
5. VISION
6. ANALISIS DE REQUERIMIENTOS
7. DOCUMENTACION DE REQUERIMIENTOS
8. DOCUMENTACION DE DISEÑO
9. ANALISIS FODA
10. ANALISIS PESTEL
11. PLANES DE PRUEBA DEL SISTEMA
12. PRUEBAS DE OPERACIÓN
13. DIAGRAMA DE GANTT O CRONOGRAMA DE REALIZACIÓN
14. DIAGRAMA ENTIDAD RELACIÓN
15. DIAGRAMAS DE FLUJO DE CADA PROCESO
17. PROCEDIMIENTOS DE MANTENIMIENTO
MANUAL DE USUARIO
NOTA: NO ABRA EXAMEN, APLICARE LA EVALUACION CONTINUA EN CADA CLASE, CON LO QUE REALICEN.
Gifs animados
Protector de Estrellas
Private Sub Command1_Click()
Dim art As String
Dim precio As String
Dim exi As String
art = InputBox("Agrege su nuevo producto", "Nuevo producto")
If art <> "" Then
lista.AddItem art
total.Caption = lista.ListCount
Else
MsgBox "No ingresaste ningun producto", , "PRECAUCION"
GoTo fin
End If
regresa:
precio = InputBox("Ingrese su precio", "Nuevo producto")
If precio <> "" Then
cost.AddItem precio
Else
MsgBox "No ingreso su precio", , "PRECAUCION"
GoTo regresa
End If
ret:
exi = InputBox("Ingresa las existencias", "NUEVO PRODUCTO")
If exi <> "" Then
exis.AddItem exi
Else
MsgBox "No ingreso las existencias", , "PRECAUCION"
GoTo ret
End If
fin:
End Sub
Private Sub Command2_Click()
Dim intresp As Integer
intresp = MsgBox("desea eliminar el registro seleccionado de la lista?", vbYesNo + vbQuestion + vbDefaultButton2, "Eliminar articulo")
If intresp = vbYes Then
cost.RemoveItem (lista.ListIndex)
exis.RemoveItem (lista.ListIndex)
lista.RemoveItem (lista.ListIndex)
total.Caption = lista.ListCount
Else
MsgBox "Se cancelo la opcion de eliminar", vbOKOnly + vbInformation, "Cancelar"
End If
End Sub
Private Sub Command3_Click()
Dim intresp As Integer
intresp = MsgBox("Desea guardar el registro?", vbYesNo + vbQuestion + vbDefaultButton2, "Guardar registro")
If intresp = vbYes Then
Kill (App.Path & "\Papeleria.txt")
Kill (App.Path & "\Papeleria$.txt")
Kill (App.Path & "\PapeleriaE.txt")
Dim I As Integer
Dim J As Integer
Dim X As Integer
Open App.Path & "\Papeleria.txt" For Append As #1
For I = o To lista.ListCount - 1
Print #1, lista.List(I)
Next
Close #1
Open App.Path & "\Papeleria$.txt" For Append As #1
For J = o To lista.ListCount - 1
Print #1, cost.List(J)
Next
Close #1
Open App.Path & "\PapeleriaE.txt" For Append As #1
For X = o To lista.ListCount - 1
Print #1, exis.List(X)
Next
Close #1
MsgBox "Se ha guardado existosamente ", , "GUARDAR"
Else
MsgBox "NO SE GUARDO EL REGISTRO ", , "CANCELACION"
End If
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Command5_Click()
Dim cont As Integer
cont = 1
If op = "" Then
MsgBox "No hay nada que buscar", , "PRECAUCION"
Else
Open App.Path & "\Papeleria.txt" For Append As 1
For I = 0 To lista.ListCount - 1
If op.Text = lista.List(I) Then
Label6.Visible = True
Label8.Visible = True
txt.Visible = True
precio.Visible = True
existencias.Visible = True
txt.Caption = lista.List(I)
precio.Caption = cost.List(I)
existencias.Caption = exis.List(I)
GoTo fin
Else
If cont = lista.ListCount Then txt.Caption = "No se encontro el archivo"
Label6.Visible = False
Label8.Visible = False
precio.Visible = False
existencias.Visible = False
End If
cont = cont + 1
Next
fin:
Close #1
End If
op.Text = ""
End Sub
Private Sub Form_Load()
Dim var As String
Open App.Path & "\Papeleria.txt" For Append As #1
Do While Not EOF(1)
Input #1, var
lista.AddItem var
Loop
Close #1
Open App.Path & "\Papeleria$.txt" For Append As #1
Do While Not EOF(1)
Input #1, var
cost.AddItem var
Loop
Close #1
Open App.Path & "\PapeleriaE.txt" For Append As #1
Do While Not EOF(1)
Input #1, var
exis.AddItem var
Loop
Close #1
Open App.Path & "\Papeleria.txt" For Input As #1
Do While Not EOF(1)
Input #1, var
lista.AddItem var
Loop
Close #1
Open App.Path & "\Papeleria$.txt" For Input As #1
Do While Not EOF(1)
Input #1, var
cost.AddItem var
Loop
Close #1
Open App.Path & "\PapeleriaE.txt" For Input As #1
Do While Not EOF(1)
Input #1, var
exis.AddItem var
Loop
Close #1
total.Caption = lista.ListCount
End Sub
GIFS ANIMADOS
Option Explicit
Private FrameCount As Long
Private Const LB_DIR As Long = &H18D
Private Const DDL_ARCHIVE As Long = &H20
Private Const DDL_EXCLUSIVE As Long = &H8000
Private Const DDL_FLAGS As Long = DDL_ARCHIVE Or DDL_EXCLUSIVE
Private TotalFrames As Long
Private RepeatTimes As Long
Private Sub Command1_Click()
Dim nFrames As Long
nFrames = LoadGif(App.Path + "\efecto-de-agua.gif", Image1)
If nFrames > 0 Then
FrameCount = 0
Timer1.Interval = CLng(Image1(0).Tag)
Timer1.Enabled = True
End If
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Dim i As Long
If FrameCount < TotalFrames Then
Image1(FrameCount).Visible = False
FrameCount = FrameCount + 1
Else
FrameCount = 0
For i = 1 To Image1.Count - 1
Image1(i).Visible = False
Next i
End If
Image1(FrameCount).Visible = True
Timer1.Interval = CLng(Image1(FrameCount).Tag)
End Sub
Private Function LoadGif( _
sFile As String, _
aImg As Variant) As Long
Dim hFile As Long
Dim sImgHeader As String
Dim sFileHeader As String
Dim sBuff As String
Dim sPicsBuff As String
Dim nImgCount As Long
Dim i As Long
Dim j As Long
Dim xOff As Long
Dim yOff As Long
Dim TimeWait As Long
Dim sGifMagic As String
If Dir$(sFile) = "" Or sFile = "" Then
MsgBox "File " & sFile & " not found", vbInformation
Exit Function
End If
sGifMagic = Chr$(0) & Chr$(33) & Chr$(249)
If aImg.Count > 1 Then
For i = 1 To aImg.Count - 1
Unload aImg(i)
Next i
End If
hFile = FreeFile
Open sFile For Binary Access Read As hFile
sBuff = String(LOF(hFile), Chr(0))
Get #hFile, , sBuff
Close #hFile
i = 1
nImgCount = 0
j = InStr(1, sBuff, sGifMagic) + 1
sFileHeader = Left(sBuff, j)
If Left$(sFileHeader, 3) <> "GIF" Then
MsgBox "This file is not a *.gif file", vbInformation
Exit Function
End If
LoadGif = True
i = j + 2
If Len(sFileHeader) >= 127 Then
RepeatTimes& = Asc(Mid(sFileHeader, 126, 1)) + _
(Asc(Mid(sFileHeader, 127, 1)) * 256&)
Else
RepeatTimes = 0
End If
hFile = FreeFile
Open "temp.gif" For Binary As hFile
Do
nImgCount = nImgCount + 1
j = InStr(i, sBuff, sGifMagic) + 3
If j > Len(sGifMagic) Then
sPicsBuff = String(Len(sFileHeader) + j - i, Chr$(0))
sPicsBuff = sFileHeader & Mid(sBuff, i - 1, j - i)
Put #hFile, 1, sPicsBuff
sImgHeader = Left(Mid(sBuff, i - 1, j - i), 16)
TimeWait = ((Asc(Mid(sImgHeader, 4, 1))) + _
(Asc(Mid(sImgHeader, 5, 1)) * 256&)) * 10&
If nImgCount > 1 Then
Load aImg(nImgCount - 1)
xOff = Asc(Mid(sImgHeader, 9, 1)) + _
(Asc(Mid(sImgHeader, 10, 1)) * 256&)
yOff = Asc(Mid(sImgHeader, 11, 1)) + _
(Asc(Mid(sImgHeader, 12, 1)) * 256&)
aImg(nImgCount - 1).Left = aImg(0).Left + _
(xOff * Screen.TwipsPerPixelX)
aImg(nImgCount - 1).Top = aImg(0).Top + _
(yOff * Screen.TwipsPerPixelY)
End If
aImg(nImgCount - 1).Tag = TimeWait
aImg(nImgCount - 1).Picture = LoadPicture("temp.gif")
i = j
End If
Loop Until j = 3
Close #hFile
Kill "temp.gif"
TotalFrames = aImg.Count - 1
LoadGif = TotalFrames
Exit Function
ErrHandler:
MsgBox "Error No. " & Err.Number & " when reading file", vbCritical
LoadGif = False
On Error GoTo 0
End Function
Ejercicio 2
Interfaz
Codigo Fuente
Private Sub Combo1_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "Debes ingresar un texto para añadir un elemento", vbCritical
GoTo b
End If
Combo1.AddItem Text1.Text
List1.AddItem Text1.Text
Text1.Text = ""
b:
End Sub
Private Sub Command2_Click()
If List1.ListIndex = -1 Then
MsgBox "Debes seleccionar un elemento a la lista, si está vacia prueba Añadir", vbCritical
GoTo a
End If
List1.RemoveItem (List1.ListIndex)
Combo1.RemoveItem (Combo1.ListIndex)
a:
End Sub
Private Sub List1_Click()
Combo1.ListIndex = List1.ListIndex
End Sub
Ejercicio 3
Interfaz
Codigo Fuente
Private Sub HScroll1_Change()
Label2 = HScroll1.Value
End Sub
Private Sub VScroll1_Change()
Label4 = VScroll1.Value
End Sub
Ejercicio 4
Interfaz
Codigo Fuente
Dim FormLoad As Boolean
Const EnableAlarm = "ALARMA OFF"
Const AlarmEnabled = "ALARM ON"
Const StopAlarm = "Detener ALARMA"
Private Sub Command1_Click()
End
End Sub
Private Sub examinar_Click()
CommonDialog1.DialogTitle = "Selecciona un archivo de Musica mp3"
CommonDialog1.Filter = "Archivos de Musica MP3"
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
ruta.Text = CommonDialog1.FileName
WindowsMediaPlayer1.URL = ruta.Text
Else
ruta = "No se selecciono un sonido"
End If
End Sub
Private Sub Form_Load()
FormLoad = True
Alarmsettingwas = GetSetting(App.EXEName, "Alarma", "Configuración", Format(Now, "hh:mm:ss"))
alarma.Caption = Alarmsettingwas
mando(0).Value = Hour(Alarmsettingwas)
mando(1).Value = Minute(Alarmsettingwas)
mando(2).Value = Second(Alarmsettingwas)
interruptor.Caption = EnableAlarm
interruptor.BackColor = vbButtonFace
AlarmwasEnabled = GetSetting(App.EXEName, "Alarma", "Establecida", False)
If AlarmwasEnabled Then interruptor_Click
Timer1.Enabled = True
Timer2.Enabled = False
Timer3.Enabled = False
End Sub
Private Sub interruptor_Click()
Select Case interruptor.Caption
Case EnableAlarm
interruptor.Caption = AlarmEnabled
interruptor.BackColor = &HC0C0FF 'vbGreen
SaveSetting App.EXEName, "Alarma", "on", True
Case AlarmEnabled
interruptor.Caption = EnableAlarm
interruptor.BackColor = &HC0C0FF
Case StopAlarm
interruptor.Caption = EnableAlarm
interruptor.BackColor = vbButtonFace
WindowsMediaPlayer1.Close
Timer3.Enabled = False
End Select
End Sub
Private Sub mando_Change(Index As Integer)
alarma.Caption = Format(TimeSerial(mando(0).Value, mando(1).Value, mando(2).Value), "hh:mm:ss")
If Not FormLoad Then SaveSetting App.EXEName, "Alarm", "Setting", alarma.Caption
End Sub
Private Sub Timer1_Timer()
h = Hour(Now)
m = Minute(Now)
s = Second(Now)
hora.Caption = Format(TimeSerial(h, m, s), "hh.mm.ss")
zerotime = (mando(0).Value - h) * 60 * 60 + (mando(1).Value - m) * 60 + (mando(2).Value - s)
If zerotime < 0 Then
zerotime = zerotime + 24 * 60 * 60!
restante.Caption = Format(TimeSerial(mando(0).Value - h + 24, mando(1).Value - m, mando(2).Value - s), "hh:mm:ss")
Else
restante.Caption = Format(TimeSerial(mando(0).Value - h, mando(1).Value - m, mando(2).Value - s), "hh:mm:ss")
End If
Select Case zerotime
Case 0 To 1
If interruptor.Caption = AlarmEnabled Then
WindowsMediaPlayer1.URL = ruta.Text
Timer3.Enabled = True
interruptor.Caption = StopAlarm
End If
End Select
End Sub
Private Sub Timer3_Timer()
Static ff As Boolean
ff = Not ff
Select Case ff
Case True
interruptor.BackColor = vbRed
Case False
interruptor.BackColor = vbYellow
End Select
End Sub
Ejercicio 5
Interfaz
Codigo Fuente
Crear un módulo:
Sub DrawBarcode(ByVal bc_string As String, obj As Control)
Dim xpos!, y1!, y2!, dw%, th!, tw, new_string$
'define barcode patterns
Dim bc(90) As String
bc(1) = "1 1221" 'pre-amble
bc(2) = "1 1221" 'post-amble
bc(48) = "11 221" 'digits
bc(49) = "21 112"
bc(50) = "12 112"
bc(51) = "22 111"
bc(52) = "11 212"
bc(53) = "21 211"
bc(54) = "12 211"
bc(55) = "11 122"
bc(56) = "21 121"
bc(57) = "12 121"
'capital letters
bc(65) = "211 12" 'A
bc(66) = "121 12" 'B
bc(67) = "221 11" 'C
bc(68) = "112 12" 'D
bc(69) = "212 11" 'E
bc(70) = "122 11" 'F bc(71) = "111 22" 'G
bc(72) = "211 21" 'H
bc(73) = "121 21" 'I
bc(74) = "112 21" 'J
bc(75) = "2111 2" 'K
bc(76) = "1211 2" 'L
bc(77) = "2211 1" 'M
bc(78) = "1121 2" 'N
bc(79) = "2121 1" 'O
bc(80) = "1221 1" 'P
bc(81) = "1112 2" 'Q
bc(82) = "2112 1" 'R
bc(83) = "1212 1" 'S
bc(84) = "1122 1" 'T
bc(85) = "2 1112" 'U
bc(86) = "1 2112" 'V
bc(87) = "2 2111" 'W
bc(88) = "1 1212" 'X
bc(89) = "2 1211" 'Y
bc(90) = "1 2211" 'Z
'Misc
bc(32) = "1 2121" 'space
bc(35) = "" '# cannot do!
bc(36) = "1 1 1 11" '$
bc(37) = "11 1 1 1" '%
bc(43) = "1 11 1 1" '+ bc(45) = "1 1122" '-
bc(47) = "1 1 11 1" '/
bc(46) = "2 1121" '.
bc(64) = "" '@ cannot do!
bc(65) = "1 1221" '*
bc_string = UCase(bc_string)
'dimensions
obj.ScaleMode = 3 'pixels
obj.Cls
obj.Picture = Nothing
dw = CInt(obj.ScaleHeight / 40) 'space between bars
If dw < 1 Then dw = 1
'Debug.Print dw
th = obj.TextHeight(bc_string) 'text height
tw = obj.TextWidth(bc_string) 'text width
new_string = Chr$(1) & bc_string & Chr$(2) 'add pre-amble, post-amble
y1 = obj.ScaleTop
y2 = obj.ScaleTop + obj.ScaleHeight - 1.5 * th
obj.Width = 1.1 * Len(new_string) * (15 * dw) * obj.Width / obj.ScaleWidth
'draw each character in barcode string
xpos = obj.ScaleLeft
For n = 1 To Len(new_string)
c = Asc(Mid$(new_string, n, 1))
If c > 90 Then c = 0
bc_pattern$ = bc(c)
'draw each bar
For i = 1 To Len(bc_pattern$)
Select Case Mid$(bc_pattern$, i, 1)
Case " "
'space
obj.Line (xpos, y1)-(xpos + 1 * dw, y2), &HFFFFFF, BF
xpos = xpos + dw
Case "1"
'space
obj.Line (xpos, y1)-(xpos + 1 * dw, y2), &HFFFFFF, BF
xpos = xpos + dw
'line
obj.Line (xpos, y1)-(xpos + 1 * dw, y2), &H0&, BF
xpos = xpos + dw
Case "2"
'space obj.Line (xpos, y1)-(xpos + 1 * dw, y2), &HFFFFFF, BF
xpos = xpos + dw
'wide line
obj.Line (xpos, y1)-(xpos + 2 * dw, y2), &H0&, BF
xpos = xpos + 2 * dw
End Select
Next
Next
'1 more space
obj.Line (xpos, y1)-(xpos + 1 * dw, y2), &HFFFFFF, BF
xpos = xpos + dw
'final size and text
obj.Width = (xpos + dw) * obj.Width / obj.ScaleWidth
obj.CurrentX = (obj.ScaleWidth - tw) / 2
obj.CurrentY = y2 + 0.25 * th
obj.Print bc_string
'copy to clipboard
obj.Picture = obj.Image
Clipboard.Clear
Clipboard.SetData obj.Image, 2
End Sub
Demás programación:
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdPrint_Click()
Printer.PaintPicture Picture1, 5000, 5000
Printer.EndDoc
End Sub
Private Sub Form_Activate()
optSize(1) = 1
End Sub
Private Sub optSize_Click(Index As Integer)
Picture1.ScaleMode = 3
Select Case Index
Case 0
Picture1.Height = Picture1.Height * (1.4 * 40 / Picture1.ScaleHeight)
Picture1.FontSize = 8
Case 1
Picture1.Height = Picture1.Height * (2.4 * 40 / Picture1.ScaleHeight)
Picture1.FontSize = 10
Case 2
Picture1.Height = Picture1.Height * (3 * 40 / Picture1.ScaleHeight)
Picture1.FontSize = 14
End Select
Call Text1_Change
End Sub
Private Sub Text1_Change()
Call DrawBarcode(Text1, Picture1)
MinWidth = 2 * Text1.Left + Text1.Width
pw = 2 * Picture1.Left + Picture1.Width
fw = MinWidth
If pw > fw Then fw = pw
Form1.Width = fw
End Sub
BASE DE DATOS CON FOTOGRAFIA.
INTERFAZ.
CODIGO FUENTE.
Private Sub Avanzar_Click(Index As Integer)
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MovePrevious
End If
X = App.Path
Image1.Picture = LoadPicture(X & "\" & Label5.Caption)
End Sub
Private Sub Command1_Click()
Adodc1.Recordset.MoveFirst
X = App.Path
Image1.Picture = LoadPicture(X & "\" & Label5.Caption)
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.MoveLast
X = App.Path
Image1.Picture = LoadPicture(X & "\" & Label5.Caption)
End Sub
Private Sub Command3_Click()
If Command3.Caption = "nuevo" Then
Adodc1.Recordset.AddNew
Text5.Visible = True
Command3.Caption = "Guardar"
Else
Command3.Caption = "Nuevo"
Adodc1.Recordset.Update
Adodc1.Recordset.MoveLast
Text5.Visible = False
MsgBox "Se guardo Correctamente el nuevo regisdtro", vbInformation
End If
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.Update
Adodc1.Recordset.MoveLast
Text5.Visible = False
MsgBox "Se guardo Correctamente el nuevo regisdtro", vbInformation
End Sub
Private Sub Command5_Click()
Abrir.ShowOpen
If Abrir.FileName <> "" Then
Image1.Picture = LoadPicture(Abrir.FileName)
Text5.Text = Abrir.FileTitle
Else
MsgBox "lol", vbCritical, "lel"
End If
End Sub
Private Sub Command6_Click()
Adodc1.Recordset.Update
End Sub
Private Sub Form_Load()
On Error Resume Next
X = App.Path
Image1.Picture = LoadPicture(X & "\" & Label5.Caption)
With Abrir
.Filter = "Archivo imagen|*.jpg"
.DialogTitle = "Ola ke ase"
End With
End Sub
Private Sub Regrezar_Click(Index As Integer)
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
Adodc1.Recordset.MoveNext
End If
X = App.Path
Image1.Picture = LoadPicture(X & "\" & Label5.Caption)
End Sub
INTERFAZ
Private Sub Command1_Click()
If flag = False Then
Command1.Caption = "X"
flag = True
Label5.Caption = "Player O Turn"
Else
Command1.Caption = "O"
flag = False
Label5.Caption = "Player X Turn"
End If
Win
End Sub
Private Sub Command10_Click()
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End Sub
Private Sub Command11_Click()
Label3.Caption = ""
Label4.Caption = ""
End Sub
Private Sub Command2_Click()
If flag = False Then
Command2.Caption = "X"
flag = True
Label5.Caption = "Player O Turn"
Else
Command2.Caption = "O"
flag = False
Label5.Caption = "Player X Turn"
End If
Win
End Sub
Private Sub Command3_Click()
If flag = False Then
Command3.Caption = "X"
flag = True
Label5.Caption = "Player O Turn"
Else
Command3.Caption = "O"
flag = False
Label5.Caption = "Player X Turn"
End If
Win
End Sub
Private Sub Command4_Click()
If flag = False Then
Command4.Caption = "X"
flag = True
Label5.Caption = "Player O Turn"
Else
Command4.Caption = "O"
flag = False
Label5.Caption = "Player X Turn"
End If
Win
End Sub
Private Sub Command5_Click()
If flag = False Then
Command5.Caption = "X"
flag = True
Label5.Caption = "Player O Turn"
Else
Command5.Caption = "O"
flag = False
Label5.Caption = "Player X Turn"
End If
Win
End Sub
Private Sub Command6_Click()
If flag = False Then
Command6.Caption = "X"
flag = True
Label5.Caption = "Player O Turn"
Else
Command6.Caption = "O"
flag = False
Label5.Caption = "Player X Turn"
End If
Win
End Sub
Private Sub Command7_Click()
If flag = False Then
Command7.Caption = "X"
flag = True
Label5.Caption = "Player O Turn"
Else
Command7.Caption = "O"
flag = False
Label5.Caption = "Player X Turn"
End If
Win
End Sub
Private Sub Command8_Click()
If flag = False Then
Command8.Caption = "X"
flag = True
Label5.Caption = "Player O Turn"
Else
Command8.Caption = "O"
flag = False
Label5.Caption = "Player X Turn"
End If
Win
End Sub
Private Sub Command9_Click()
If flag = False Then
Command9.Caption = "X"
flag = True
Label5.Caption = "Player O Turn"
Else
Command9.Caption = "O"
flag = False
Label5.Caption = "Player X Turn"
End If
Win
End Sub
Private Sub Win()
If Command1.Caption = "X" And Command2.Caption = "X" And Command3.Caption = "X" Then
MsgBox ("Player X Win !!")
Label3.Caption = Val(Label3.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command1.Caption = "X" And Command4.Caption = "X" And Command7.Caption = "X" Then
MsgBox ("Player X Win !!")
Label3.Caption = Val(Label3.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command1.Caption = "X" And Command5.Caption = "X" And Command9.Caption = "X" Then
MsgBox ("Player X Win !!")
Label3.Caption = Val(Label3.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command2.Caption = "X" And Command5.Caption = "X" And Command8.Caption = "X" Then
MsgBox ("Player X Win !!")
Label3.Caption = Val(Label3.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command3.Caption = "X" And Command6.Caption = "X" And Command9.Caption = "X" Then
MsgBox ("Player X Win !!")
Label3.Caption = Val(Label3.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command4.Caption = "X" And Command5.Caption = "X" And Command6.Caption = "X" Then
MsgBox ("Player X Win !!")
Label3.Caption = Val(Label3.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command7.Caption = "X" And Command8.Caption = "X" And Command9.Caption = "X" Then
MsgBox ("Player X Win !!")
Label3.Caption = Val(Label3.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command3.Caption = "X" And Command5.Caption = "X" And Command7.Caption = "X" Then
MsgBox ("Player X Win !!")
Label3.Caption = Val(Label3.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command1.Caption = "O" And Command2.Caption = "O" And Command3.Caption = "O" Then
MsgBox ("Player O Win !!")
Label4.Caption = Val(Label4.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command1.Caption = "O" And Command4.Caption = "O" And Command7.Caption = "O" Then
MsgBox ("Player O Win !!")
Label4.Caption = Val(Label4.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command1.Caption = "O" And Command5.Caption = "O" And Command9.Caption = "O" Then
MsgBox ("Player O Win !!")
Label4.Caption = Val(Label4.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command2.Caption = "O" And Command5.Caption = "O" And Command8.Caption = "O" Then
MsgBox ("Player O Win !!")
Label4.Caption = Val(Label4.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command3.Caption = "O" And Command6.Caption = "O" And Command9.Caption = "O" Then
MsgBox ("Player O Win !!")
Label4.Caption = Val(Label4.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command4.Caption = "O" And Command5.Caption = "O" And Command6.Caption = "O" Then
MsgBox ("Player O Win !!")
Label4.Caption = Val(Label4.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command7.Caption = "O" And Command8.Caption = "O" And Command9.Caption = "O" Then
MsgBox ("Player O Win !!")
Label4.Caption = Val(Label4.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
If Command3.Caption = "O" And Command5.Caption = "O" And Command7.Caption = "O" Then
MsgBox ("Player O Win !!")
Label4.Caption = Val(Label4.Caption) + Val(1)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
End If
End Sub
Private Sub Form_Load()
End Sub
No hay comentarios:
Publicar un comentario