Jump to content

Video Player

- - - - -

  • Please log in to reply
2 replies to this topic

#1
Tonchi

Tonchi

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 471 posts
  • Location:Varaždin
  • Programming Language:C, C++, C#
this is my code:


using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;


namespace TPlayer

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }


        private void Form1_Load(object sender, EventArgs e)

        {


        }


        private void button1_Click(object sender, EventArgs e)

        {

            ekran.Pause();

        }


        private void button2_Click(object sender, EventArgs e)

        {

            ekran.Play();

        }


        private void button3_Click(object sender, EventArgs e)

        {

            ekran.Stop();

        }


        private void toolStripMenuItem2_Click(object sender, EventArgs e)

        {


        }


        private void exitTPlayerToolStripMenuItem_Click(object sender, EventArgs e)

        {

            this.Close();

        }


        private void ekran_OnCompleted(object sender, EventArgs e)

        {

            

        }


        private void loadVideoToolStripMenuItem_Click(object sender, EventArgs e)

        {

            try

            {

                OpenFileDialog otvori = new OpenFileDialog();

                otvori.Filter = "Movie files|";

                if (otvori.ShowDialog() == System.Windows.Forms.DialogResult.OK)

                {

                    ekran.Play();

                }

            }

            catch (Exception )

            {

                MessageBox.Show("Unable to open!");

            }

            

        }


        private void aboutTPlayerToolStripMenuItem_Click(object sender, EventArgs e)

        {

            try

            {

                MessageBox.Show("Author: Antonio Halužan\nE-mail contact: mortis_overlord@hotmail.com\nDate of release: 12.06.2011");

            }

            catch (Exception)

            {

                MessageBox.Show("Unable to view information about TPlayer!");

            }

        }

    }

}

i'm using MoviePlayer Pro ActiveX. it's perfect with compiler but when i try to load some video it plays nothing even when i put ekran.Play(); inside Load video

any suggestions???

#2
Tonchi

Tonchi

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 471 posts
  • Location:Varaždin
  • Programming Language:C, C++, C#
i know what's the problem but i don't know how to solve it

code:


private void loadVideoToolStripMenuItem_Click(object sender, EventArgs e)

        {

            try

            {

                OpenFileDialog otvori = new OpenFileDialog();

                otvori.Filter = "Movie files|";

                if (otvori.ShowDialog() == System.Windows.Forms.DialogResult.OK)

                {

                     [B]//there should be a code which will connect dialogbox with ekran but how???[/B]

                     ekran.Play();

                }

            }

            catch (Exception )

            {

                MessageBox.Show("Unable to open!");

            }

            

        }




#3
Tonchi

Tonchi

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 471 posts
  • Location:Varaždin
  • Programming Language:C, C++, C#
i've managed that...i only need 2 more things and i'm finished with my player...i need to make when player is in full screen mode that when customer wants to exit full screen mode he needs to press ESC key on keyboard...
and i couldn't made a progressBar syncrhonisation with video control which i named "ekran" (it's display on croatian)
can anyone help me with that???




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users