Foros del Web » Programación para mayores de 30 ;) » C/C++ »

Pizarra electronica

Estas en el tema de Pizarra electronica en el foro de C/C++ en Foros del Web. Buenos dias a todos hoy inicie un proyecto para la universidad dnd estoy programando una pizarra electronica, pero tengo unos problemitas ya tengo los controles ...
  #1 (permalink)  
Antiguo 19/06/2015, 07:50
 
Fecha de Ingreso: junio-2015
Ubicación: Diriamba-Carazo
Mensajes: 5
Antigüedad: 8 años, 10 meses
Puntos: 0
Pizarra electronica

Buenos dias a todos hoy inicie un proyecto para la universidad dnd estoy programando una pizarra electronica, pero tengo unos problemitas ya tengo los controles agregados como texbox y timer picker, pero me da errores, les agradecia su ayuda con este modesto codigo

Ests son los botones
textbox (Nombre: TxtAccion) Registrara las teclas pulsadas le damos en el orden 1
textbox (Nombre: PuntoLocal) registrara los puntos del equipo local, readonly = true
textbox (Nombre: PuntoVisita) registrara los puntos del equipo visita, readonly = true
textbox (Nombre: TxtTiempo) registrara el tiempo, readonly = true
Timer(Nombre: TimerTick) servira para el tiempo
AxWindowsMediaPlayer1(Nombre: AxWindowsMediaPlayer1) nos servira para

codigo

Public Class FormMarcador
Private hora As Integer = 0
Private minuto As Integer = 0
Private segundo As Integer = 0
Private milisegundo As Integer = 0
Private _ticks As Int64
Private _tmr As Timer
Private bandera_tiempo As Integer
Private Sub FormMarcador_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Periodo.Text = 0
Me.FaltasLocal.Text = 0
Me.PuntoVisita.Text = 0
Me.PuntoLocal.Text = 0
AxWindowsMediaPlayer1.Visible = False
bandera_tiempo = 1
_tmr = New Timer
AddHandler _tmr.Tick, AddressOf TimerTick
_tmr.Interval = 1000
TxtTiempo.Text = "00:10:00"
End Sub
Private Sub TimerTick(ByVal sender As Object, ByVal e As EventArgs)
_ticks -= 10000000
Dim time1 As DateTime = New DateTime(_ticks)
If _ticks = 0 Then
_tmr.Stop()
AxWindowsMediaPlayer1.URL = (My.Application.Info.DirectoryPath + "\efectoalarrma.mp3")
End If
TxtTiempo.Text = time1.ToString("T")
End Sub
' si persionamos una tecla
Private Sub TxtAccion_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtAccion.KeyDown

If e.KeyData = Keys.L Then 'tecla L agrega punto a local
Me.PuntoLocal.Text = Val(Me.PuntoLocal.Text) + 1
ElseIf e.KeyData = Keys.F1 Then ' tecla F1 nos muestra un form de ayuda con las teclas y sus funciones
FormAyuda.ShowDialog()
ElseIf e.KeyData = Keys.V Then 'tecla V agrega punto a visita
Me.PuntoVisita.Text = Val(Me.PuntoVisita.Text) + 1

ElseIf e.KeyData = Keys.Space Then ' definimos la tecla espacio para que suene la chcicharra
AxWindowsMediaPlayer1.URL = (My.Application.Info.DirectoryPath + "\efectoalarrma.mp3")
ElseIf e.KeyData = Keys.Enter And bandera_tiempo = 1 Then
_ticks = 1 * 600 * 10000000L

_tmr.Start()
bandera_tiempo = 2
'la tecla enter sera la encargada del tiempo tendra dos opciones (iniciar y pausar)
ElseIf e.KeyData = Keys.Enter And bandera_tiempo = 2 Then
_tmr.Stop()
bandera_tiempo = 3

ElseIf e.KeyData = Keys.Enter And bandera_tiempo = 3 Then
_tmr.Start()
bandera_tiempo = 2

ElseIf e.KeyData = Keys.Control + Keys.X Then ' Tecla control + x cierra aplicacion
Dim res As String
res = MessageBox.Show("Esta seguro que desea cerra aplicación", "Cerrar aplicación", MessageBoxButtons.YesNo)
If res = Windows.Forms.DialogResult.Yes Then
Me.Close()
End If
End If
End Sub

End Class
  #2 (permalink)  
Antiguo 19/06/2015, 08:00
Avatar de Malenko
Moderador
 
Fecha de Ingreso: enero-2008
Mensajes: 5.323
Antigüedad: 16 años, 3 meses
Puntos: 606
Respuesta: Pizarra electronica

Te has dado cuenta que has puesto código de VisualBasic.Net en el foro de C/C++?

Además tampoco indicas que errores te da, vamos que mucho no estás facilitando el que te puedan ayudar...
__________________
Aviso: No se resuelven dudas por MP!
  #3 (permalink)  
Antiguo 19/06/2015, 17:45
 
Fecha de Ingreso: junio-2015
Ubicación: Diriamba-Carazo
Mensajes: 5
Antigüedad: 8 años, 10 meses
Puntos: 0
Respuesta: Pizarra electronica

soy nuevo en el foro, voy a rectificar la información y abrire una nueva consulta..

gracias por la aclaración

saludos

Etiquetas: char, electronica, funcion, int, programa
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:13.