Click here to Skip to main content
15,900,110 members
Home / Discussions / C#
   

C#

 
GeneralRe: comparing volatile integer Pin
David Skelly24-Nov-09 6:22
David Skelly24-Nov-09 6:22 
AnswerRe: comparing volatile integer Pin
David Skelly23-Nov-09 22:45
David Skelly23-Nov-09 22:45 
GeneralRe: comparing volatile integer Pin
manustone23-Nov-09 23:44
manustone23-Nov-09 23:44 
GeneralRe: comparing volatile integer Pin
Luc Pattyn23-Nov-09 23:55
sitebuilderLuc Pattyn23-Nov-09 23:55 
AnswerSurprise! Pin
harold aptroot24-Nov-09 2:19
harold aptroot24-Nov-09 2:19 
GeneralRe: Surprise! Pin
manustone24-Nov-09 2:47
manustone24-Nov-09 2:47 
GeneralRe: Surprise! Pin
harold aptroot24-Nov-09 3:19
harold aptroot24-Nov-09 3:19 
Questioni have problem axShockwaveFlash1_OnProgress [modified] Pin
bekzod00923-Nov-09 19:14
bekzod00923-Nov-09 19:14 
<br />
using System;<br />
using System.Drawing;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Windows.Forms;<br />
using System.Data;<br />
using System.IO;<br />
<br />
namespace FlashTest<br />
{<br />
    /// <summary><br />
    /// Summary description for Form1.<br />
    /// </summary><br />
    public class Form1 : System.Windows.Forms.Form<br />
    {<br />
        private AxShockwaveFlashObjects.AxShockwaveFlash axShockwaveFlash1;<br />
        private System.Windows.Forms.Button button1;<br />
        private System.Windows.Forms.Button button2;<br />
        private System.Windows.Forms.Button button3;<br />
        private System.Windows.Forms.Button button4;<br />
        private System.Windows.Forms.TrackBar trackBar1;<br />
        private System.Windows.Forms.Label label1;<br />
        /// <summary><br />
        /// Required designer variable.<br />
        /// </summary><br />
        private System.ComponentModel.Container components = null;<br />
<br />
        public Form1()<br />
        {<br />
            //<br />
            // Required for Windows Form Designer support<br />
            //<br />
            InitializeComponent();<br />
<br />
            //<br />
            // TODO: Add any constructor code after InitializeComponent call<br />
            //<br />
        }<br />
<br />
        /// <summary><br />
        /// Clean up any resources being used.<br />
        /// </summary><br />
        protected override void Dispose( bool disposing )<br />
        {<br />
            if( disposing )<br />
            {<br />
                if (components != null) <br />
                {<br />
                    components.Dispose();<br />
                }<br />
            }<br />
            base.Dispose( disposing );<br />
        }<br />
<br />
        #region Windows Form Designer generated code<br />
        /// <summary><br />
        /// Required method for Designer support - do not modify<br />
        /// the contents of this method with the code editor.<br />
        /// </summary><br />
        private void InitializeComponent()<br />
        {<br />
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));<br />
            this.axShockwaveFlash1 = new AxShockwaveFlashObjects.AxShockwaveFlash();<br />
            this.button1 = new System.Windows.Forms.Button();<br />
            this.button2 = new System.Windows.Forms.Button();<br />
            this.button3 = new System.Windows.Forms.Button();<br />
            this.button4 = new System.Windows.Forms.Button();<br />
            this.trackBar1 = new System.Windows.Forms.TrackBar();<br />
            this.label1 = new System.Windows.Forms.Label();<br />
            ((System.ComponentModel.ISupportInitialize)(this.axShockwaveFlash1)).BeginInit();<br />
            ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();<br />
            this.SuspendLayout();<br />
            // <br />
            // axShockwaveFlash1<br />
            // <br />
            this.axShockwaveFlash1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) <br />
                | System.Windows.Forms.AnchorStyles.Left) <br />
                | System.Windows.Forms.AnchorStyles.Right)));<br />
            this.axShockwaveFlash1.Enabled = true;<br />
            this.axShockwaveFlash1.Location = new System.Drawing.Point(32, 24);<br />
            this.axShockwaveFlash1.Name = "axShockwaveFlash1";<br />
            this.axShockwaveFlash1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axShockwaveFlash1.OcxState")));<br />
            this.axShockwaveFlash1.Size = new System.Drawing.Size(728, 504);<br />
            this.axShockwaveFlash1.TabIndex = 0;<br />
            this.axShockwaveFlash1.OnProgress += new AxShockwaveFlashObjects._IShockwaveFlashEvents_OnProgressEventHandler(this.axShockwaveFlash1_OnProgress);<br />
            // <br />
            // button1<br />
            // <br />
            this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));<br />
            this.button1.Location = new System.Drawing.Point(32, 592);<br />
            this.button1.Name = "button1";<br />
            this.button1.Size = new System.Drawing.Size(80, 23);<br />
            this.button1.TabIndex = 1;<br />
            this.button1.Text = "Load";<br />
            this.button1.Click += new System.EventHandler(this.button1_Click);<br />
            // <br />
            // button2<br />
            // <br />
            this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));<br />
            this.button2.Location = new System.Drawing.Point(128, 592);<br />
            this.button2.Name = "button2";<br />
            this.button2.Size = new System.Drawing.Size(80, 23);<br />
            this.button2.TabIndex = 2;<br />
            this.button2.Text = "Play";<br />
            this.button2.Click += new System.EventHandler(this.button2_Click);<br />
            // <br />
            // button3<br />
            // <br />
            this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));<br />
            this.button3.Location = new System.Drawing.Point(224, 592);<br />
            this.button3.Name = "button3";<br />
            this.button3.Size = new System.Drawing.Size(80, 23);<br />
            this.button3.TabIndex = 3;<br />
            this.button3.Text = "Pause";<br />
            this.button3.Click += new System.EventHandler(this.button3_Click);<br />
            // <br />
            // button4<br />
            // <br />
            this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));<br />
            this.button4.Location = new System.Drawing.Point(320, 592);<br />
            this.button4.Name = "button4";<br />
            this.button4.Size = new System.Drawing.Size(80, 23);<br />
            this.button4.TabIndex = 4;<br />
            this.button4.Text = "Stop";<br />
            this.button4.Click += new System.EventHandler(this.button4_Click);<br />
            // <br />
            // trackBar1<br />
            // <br />
            this.trackBar1.Location = new System.Drawing.Point(24, 536);<br />
            this.trackBar1.Maximum = 1;<br />
            this.trackBar1.Minimum = -1;<br />
            this.trackBar1.Name = "trackBar1";<br />
            this.trackBar1.Size = new System.Drawing.Size(744, 45);<br />
            this.trackBar1.TabIndex = 5;<br />
            this.trackBar1.TickStyle = System.Windows.Forms.TickStyle.None;<br />
            this.trackBar1.Value = -1;<br />
            this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_ValueChanged);<br />
            // <br />
            // label1<br />
            // <br />
            this.label1.Location = new System.Drawing.Point(680, 600);<br />
            this.label1.Name = "label1";<br />
            this.label1.Size = new System.Drawing.Size(100, 16);<br />
            this.label1.TabIndex = 6;<br />
            // <br />
            // Form1<br />
            // <br />
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);<br />
            this.ClientSize = new System.Drawing.Size(792, 630);<br />
            this.Controls.Add(this.label1);<br />
            this.Controls.Add(this.trackBar1);<br />
            this.Controls.Add(this.button4);<br />
            this.Controls.Add(this.button3);<br />
            this.Controls.Add(this.button2);<br />
            this.Controls.Add(this.button1);<br />
            this.Controls.Add(this.axShockwaveFlash1);<br />
            this.Name = "Form1";<br />
            this.Text = "Form1";<br />
            ((System.ComponentModel.ISupportInitialize)(this.axShockwaveFlash1)).EndInit();<br />
            ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();<br />
            this.ResumeLayout(false);<br />
<br />
        }<br />
        #endregion<br />
<br />
        /// <summary><br />
        /// The main entry point for the application.<br />
        /// </summary><br />
        [STAThread]<br />
        static void Main() <br />
        {<br />
            Application.Run(new Form1());<br />
        }<br />
<br />
        private void button1_Click(object sender, System.EventArgs e)<br />
        {<br />
            axShockwaveFlash1.Movie = Directory.GetCurrentDirectory() + "\\A02_09.swf";<br />
            axShockwaveFlash1.StopPlay();<br />
            trackBar1.Maximum = axShockwaveFlash1.TotalFrames;<br />
            label1.Text = axShockwaveFlash1.TotalFrames.ToString();<br />
        }<br />
<br />
        private void button2_Click(object sender, System.EventArgs e)<br />
        {<br />
            axShockwaveFlash1.Play();<br />
        }<br />
<br />
        private void button3_Click(object sender, System.EventArgs e)<br />
        {<br />
            axShockwaveFlash1.StopPlay();<br />
        }<br />
<br />
        private void button4_Click(object sender, System.EventArgs e)<br />
        {<br />
            axShockwaveFlash1.StopPlay();<br />
            axShockwaveFlash1.FrameNum = -1;<br />
        }<br />
<br />
// why this is not working... ?<br />
        private void axShockwaveFlash1_OnProgress(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_OnProgressEvent e)<br />
        {<br />
            this.trackBar1.Value = axShockwaveFlash1.FrameNum;<br />
        }<br />
<br />
        private void trackBar1_ValueChanged(object sender, System.EventArgs e)<br />
        {<br />
            axShockwaveFlash1.FrameNum = trackBar1.Value;<br />
        }<br />
    }<br />
}<br />
<br />

Thanks All..

modified on Tuesday, November 24, 2009 1:22 AM

AnswerRe: i have problem axShockwaveFlash1_OnProgress Pin
Richard MacCutchan23-Nov-09 21:52
mveRichard MacCutchan23-Nov-09 21:52 
QuestionLinq question, error I do not understand Pin
Calvin Bell23-Nov-09 12:49
Calvin Bell23-Nov-09 12:49 
AnswerRe: Linq question, error I do not understand Pin
Ravi Bhavnani23-Nov-09 13:49
professionalRavi Bhavnani23-Nov-09 13:49 
GeneralRe: Linq question, error I do not understand Pin
Calvin Bell24-Nov-09 2:49
Calvin Bell24-Nov-09 2:49 
GeneralRe: Linq question, error I do not understand Pin
Ravi Bhavnani24-Nov-09 3:52
professionalRavi Bhavnani24-Nov-09 3:52 
Questioncan TcpClient :: GetStream() be used in separate threads for the same TcpClient ? Pin
abiemann23-Nov-09 12:44
abiemann23-Nov-09 12:44 
AnswerRe: can TcpClient :: GetStream() be used in separate threads for the same TcpClient ? Pin
April Fans24-Nov-09 0:32
April Fans24-Nov-09 0:32 
AnswerRe: can TcpClient :: GetStream() be used in separate threads for the same TcpClient ? Pin
Paulo Zemek24-Nov-09 1:15
Paulo Zemek24-Nov-09 1:15 
GeneralRe: can TcpClient :: GetStream() be used in separate threads for the same TcpClient ? Pin
abiemann30-Nov-09 6:41
abiemann30-Nov-09 6:41 
QuestionWebbrowser control print preview not working for background color Pin
Shukra23-Nov-09 12:04
Shukra23-Nov-09 12:04 
AnswerRe: Webbrowser control print preview not working for background color Pin
Dave Kreskowiak23-Nov-09 12:52
mveDave Kreskowiak23-Nov-09 12:52 
AnswerRe: Webbrowser control print preview not working for background color Pin
Ravi Bhavnani23-Nov-09 13:55
professionalRavi Bhavnani23-Nov-09 13:55 
GeneralRe: Webbrowser control print preview not working for background color Pin
Shukra23-Nov-09 17:23
Shukra23-Nov-09 17:23 
AnswerRe: Webbrowser control print preview not working for background color Pin
Ravi Bhavnani23-Nov-09 17:47
professionalRavi Bhavnani23-Nov-09 17:47 
QuestionEmgu CV Vs AForge.NET Vs OpenCVDotNet Pin
Lynndah21223-Nov-09 8:55
Lynndah21223-Nov-09 8:55 
AnswerRe: Emgu CV Vs AForge.NET Vs OpenCVDotNet Pin
Dave Kreskowiak23-Nov-09 10:18
mveDave Kreskowiak23-Nov-09 10:18 
GeneralRe: Emgu CV Vs AForge.NET Vs OpenCVDotNet Pin
Lynndah21223-Nov-09 11:14
Lynndah21223-Nov-09 11:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.