locked
ContextMenuStrip not show when panel playing video RRS feed

  • Question

  • I use Panel control to play video file using right mouse click to show menu and then add a video file. In first time, Menu is shown, I add video file and when panel control run video, I click mouse again to change other file, Menustrip control is not show
    This is my code:

    private void panel1_MouseClick(object sender, MouseEventArgs e)
            {
                if (e.Button == MouseButtons.Right)
                {
                    showUdpData();
                    RightContextMenuStrip.Show(new Point(MousePosition.X, MousePosition.Y));
                    rightClickPanel = 0;
                }
            }
    


    • Edited by PTDanh Thursday, October 8, 2020 1:16 AM
    Thursday, October 8, 2020 1:11 AM

All replies

  • Hi PTDanh,

    Thank you for posting here.

    How does the panel control play videos? Did you put a certain control in the panel and use that control to play the video?

    If so, I have a guess, when you click panel for the first time, this code works.

    But when the video is playing, the panel control has been covered by that new control.

    At this point, what you click in this area is actually that new control instead of the panel.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, October 8, 2020 6:38 AM
  • This forum is for C#-specific questions. Questions related to Window Forms should be posted in the new Microsoft Q&A forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Thursday, October 8, 2020 2:13 PM