Deseo meter esta orden cuando este la pantalla completa obedezca la presion de la tecla A
Código
If e.KeyCode = Keys.A Then ''GENERO ButtonNORMAL_Click(sender, e) Else End If
Código
Public Class Form1 Dim POSICION As Point Dim ANTERIOR As Point Dim BANDERA As Boolean Dim ALTURA As Integer Private Sub AxWindowsMediaPlayer1_MouseMoveEvent(sender As Object, e As AxWMPLib._WMPOCXEvents_MouseMoveEvent) Handles AxWindowsMediaPlayer1.MouseMoveEvent POSICION = Windows.Forms.Cursor.Position End Sub Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load AxWindowsMediaPlayer1.uiMode = "NONE" AxWindowsMediaPlayer1.Location = New Point(0, 0) AxWindowsMediaPlayer1.Width = Me.Width ALTURA = AxWindowsMediaPlayer1.Height PanelCONTROLES.Location = New Point(0, PanelCONTROLES.Location.Y) PanelCONTROLES.Width = Me.Width ButtonNORMAL.Visible = False ButtonNORMAL.Anchor = AnchorStyles.Right ButtonCOMPLETA.Location = New Point(Me.Width - ButtonCOMPLETA.Width - 30, ButtonCOMPLETA.Location.Y) End Sub Private Sub ButtonINICIAR_Click(sender As System.Object, e As System.EventArgs) Handles ButtonINICIAR.Click If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then AxWindowsMediaPlayer1.URL = OpenFileDialog1.FileName AxWindowsMediaPlayer1.stretchToFit = True End If End Sub Private Sub ButtonCOMPLETA_Click(sender As System.Object, e As System.EventArgs) Handles ButtonCOMPLETA.Click Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None Me.WindowState = FormWindowState.Maximized AxWindowsMediaPlayer1.Dock = DockStyle.Fill PanelCONTROLES.Location = New Point(0, Me.Height - PanelCONTROLES.Height) PanelCONTROLES.Width = Me.Width ButtonNORMAL.Visible = True ButtonCOMPLETA.Visible = False BANDERA = True Timer1.Interval = 1000 Timer1.Start() End Sub Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick If BANDERA = True Then If ANTERIOR <> POSICION Then If PanelCONTROLES.Visible = False Then PanelCONTROLES.Visible = True ElseIf PanelCONTROLES.Visible = True Then PanelCONTROLES.Visible = False End If ANTERIOR = POSICION End If End If End Sub Private Sub ButtonNORMAL_Click(sender As System.Object, e As System.EventArgs) Handles ButtonNORMAL.Click Timer1.Stop() BANDERA = False Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable Me.WindowState = FormWindowState.Normal AxWindowsMediaPlayer1.Dock = DockStyle.None AxWindowsMediaPlayer1.Height = ALTURA PanelCONTROLES.Location = New Point(0, Me.Height - PanelCONTROLES.Height - 45) PanelCONTROLES.Width = Me.Width ButtonNORMAL.Visible = False ButtonCOMPLETA.Visible = True End Sub End Class