none
Error para desactivar el fullScreen en AxWindowsMediaPlayer RRS feed

  • Pregunta

  • Buena dia, estoy con un error el cual estoy buscando la forma de desactivar el fullScreen del reproductor, tocando cualquier tecla no consigo hacerlo con todas las teclas especialmente con la fechas, enter y escape.

    1er ejemplo:

    Public Class Form1
    
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            AxWindowsMediaPlayer1.URL = "RUTA DE LA CANCION"
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            AxWindowsMediaPlayer1.fullScreen = True
        End Sub
        Private Sub AxWindowsMediaPlayer1_KeyDownEvent(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_KeyDownEvent) Handles AxWindowsMediaPlayer1.KeyDownEvent
            AxWindowsMediaPlayer1.fullScreen = False
        End Sub
    
        Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
            AxWindowsMediaPlayer1.fullScreen = False
        End Sub
    
    
     
    
      
    
    End Class

    En el 2do ejemplo si puedo cerrar con las teclas que busco desactivar pero el error es que el fullScreen solo se mantiene activo por pocos segundos y se desactiva automáticamente.

    Public Class Form1
    
    
        Implements IMessageFilter
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            AxWindowsMediaPlayer1.URL = "RUTA DE LA CANCION"
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            AxWindowsMediaPlayer1.fullScreen = True
        End Sub
        Private Sub AxWindowsMediaPlayer1_KeyDownEvent(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_KeyDownEvent) Handles AxWindowsMediaPlayer1.KeyDownEvent
    
    
            Me.AxWindowsMediaPlayer1.fullScreen = False
        End Sub
    
        Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
            Me.AxWindowsMediaPlayer1.fullScreen = False
        End Sub
    
    
     
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Application.AddMessageFilter(Me)
        End Sub
        Public Function PreFilterMessage(ByRef MENSAJE As System.Windows.Forms.Message) As Boolean Implements IMessageFilter.PreFilterMessage
    
    
            If CInt(MENSAJE.WParam) = Keys.Escape Then
    
                Me.AxWindowsMediaPlayer1.fullScreen = False
    
            End If
    
    
    
            If CInt(MENSAJE.WParam) = Keys.Right Then
    
                Me.AxWindowsMediaPlayer1.fullScreen = False
    
            End If
    
    
            If CInt(MENSAJE.WParam) = Keys.Left Then
    
                Me.AxWindowsMediaPlayer1.fullScreen = False
    
            End If
    
            If CInt(MENSAJE.WParam) = Keys.Up Then
    
                Me.AxWindowsMediaPlayer1.fullScreen = False
    
            End If
    
            If CInt(MENSAJE.WParam) = Keys.Down Then
    
                Me.AxWindowsMediaPlayer1.fullScreen = False
    
            End If
    
    
    
            If CInt(MENSAJE.WParam) = Keys.Enter Then
    
                Me.AxWindowsMediaPlayer1.fullScreen = False
    
            End If
    
    
            Return False
    
        End Function
    
    End Class

    Alguien me puede ayudar con este problema, gracias.


    jueves, 12 de octubre de 2017 20:44