• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6309
  • Last Modified:

Animated dialog (Like file copy in Windows)

Hi experts,
I would like to have a simple dialog which will resemble the Windows File Copy Dialog.
In simple words, I would like to have the animation on this dialog, like the folders flying on the file copy dialog.
How would I do it in VS2005 C#.NET2.0 app?

Thanks
0
vvvlad42
Asked:
vvvlad42
  • 6
  • 4
1 Solution
 
Jai STech ArchCommented:
the file copy that you are seeing is avaialble as an avi / mov file, you can have a control which will hold the avi file and its there for you...
0
 
vvvlad42Author Commented:
Can you give me some code example? Which control are you talking about?
Is there a way to use gif or swf files?
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
vvvlad42Author Commented:
I'm sorry, but these are not very helpful...
I wrote "VS2005 C#.NET2.0 app" not VB app


0
 
Jai STech ArchCommented:
either its VB.NET or c# you can use the media player OCX to display the filecopy.avi file...the filcopy.avi you can search and download from google...

http://www.dotnet247.com/247reference/msgs/44/223296.aspx

msdn also has an article on that ...
add a media polayer OCX to your form and assign the avi to it ...
you can use the START and STOP option of media player to make it appearing like copying...windows uses the same thing...
0
 
Jai STech ArchCommented:
the filecopy avi is also avaialble here
C:\Program Files\Microsoft Visual Studio 8\Common7\VS2005ImageLibrary
0
 
Jai STech ArchCommented:
there will be a zip file that contains that AVI...
jst found that there is also a GIF available...try using it ith a image / picture box...
0
 
vvvlad42Author Commented:
Hi again,
Thank you for your replies.
You provide me with the same info I already know.
I tried to play some gifs in PictureBox - it doesn't work (only static image).
I know there is an avi file for copy dialog (I don't need it...)
When you tell me to use ocx file, why don't you tell me the name of ocx, how to import it to my project (there is a dialog for dlls or com objects)?
I understand that it should be a short code, why don't you paste here some example of how to use the ocx.

Believe me, I did some extensive  search on google before asking the question here, I understand the general idea, what I need now is a Working code....

Thank you again.
0
 
Jai STech ArchCommented:
it was so simple
namespace button_click
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.SuspendLayout();
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(60, 117);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 0;
            this.button1.Text = "button1";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.DragDrop += new System.Windows.Forms.DragEventHandler(this.button1_DragDrop);
            //
            // button2
            //
            this.button2.Location = new System.Drawing.Point(43, 29);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(75, 23);
            this.button2.TabIndex = 1;
            this.button2.Text = "button2";
            this.button2.UseVisualStyleBackColor = true;
            //
            // pictureBox1
            //
            this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
            this.pictureBox1.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.InitialImage")));
            this.pictureBox1.Location = new System.Drawing.Point(12, 41);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(268, 119);
            this.pictureBox1.TabIndex = 2;
            this.pictureBox1.TabStop = false;
            this.pictureBox1.WaitOnLoad = true;
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(292, 266);
            this.Controls.Add(this.pictureBox1);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.button1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.PictureBox pictureBox1;
    }
}

Add a picture box to your form - PICTURE BOX

Assign the GIF image to the IMAGE property of your picture box...
when you execute it...you will see the GIF image working...as in windows...

and - I dont  post solutions without making sure that it works...
and you should have mentioned what you have tried and what z not working
0
 
vvvlad42Author Commented:
You are right...

Out of 10 gifs, only 3 work with picturebox.....
that's why I didn't succeed...

Thank you again.


0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now