Tag Archives: multimedia

Animate exploding 3-dimensional pie slices in C#

The example Draw 3-dimensional pie slices in C# shows how to highlight one or more 3-D pie slices by “exploding” them. This example draws even more attention to the exploded pie slices by animating their explosion. The program controls the … Continue reading

Posted in algorithms, animation, graphics, mathematics, multimedia | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

Use Windows Forms controls to make multiple stacked expanders in C#

The example Use Windows Forms controls to make an expander in C# shows how to make simple expanders. By collapsing a Panel, the program allows the user to hide unwanted information. That frees up space on the form that the … Continue reading

Posted in animation, controls, multimedia | Tagged , , , , , , , , , , , , , | 5 Comments

Use Windows Forms controls to make an expander in C#

WPF, Silverlight, Metro, or whatever Microsoft is calling this stuff now days has some useful controls in the System.Windows.Controls namespace including Expander. An Expander displays a small arrow button and a panel where you can place other controls. When the … Continue reading

Posted in animation, controls, multimedia | Tagged , , , , , , , , , , | Leave a comment

Play an audio resource in C#

The System.Media.SoundPlayer class lets you easily play a WAV file stored as an audio resource. For this example, first add the WAV file as an audio resource. To do that, open the Project menu and select Properties. Then open the … Continue reading

Posted in audio, multimedia | Tagged , , , , , , , , , , , , , | 1 Comment

Play WAV files in C#

The System.Media.SoundPlayer class lets you easily play WAV files. This example uses the following PlayWav method to play WAV files. // The player making the current sound. private SoundPlayer Player = null; // Dispose of the current player and // … Continue reading

Posted in audio, files, multimedia | Tagged , , , , , , , , , , , , , | Leave a comment

Animate a piston driving a wheel in C#

This example draws a piston that powers a rotating wheel. The program uses a timer to move the piston. The following code shows the timer’s Tick event handler. // Move the piston. private void tmrMovePiston_Tick(object sender, EventArgs e) { X … Continue reading

Posted in algorithms, animation, drawing, graphics, multimedia | Tagged , , , , , , , , , , , , | Leave a comment

Make animated labels in C#

This example shows how to make animated labels that slowly move into position to make an interesting “movie credit” effect. Note that the example’s result is better than the result giving by the GIF on the right. The GIF is … Continue reading

Posted in animation, graphics, multimedia | Tagged , , , , , , , , , , , , | 1 Comment

Draw animated text in C#

Note that the result in the executable is better than the result giving by the GIF on the right. The GIF is a bit jerky because it uses only 20 frames instead of the 200 used by the program. This … Continue reading

Posted in animation, fonts, graphics, multimedia | Tagged , , , , , , , , , , , | Leave a comment

Set video position with a scroll bar with WPF in C#

The example Control a video with the WPF MediaElement in C# lets you set video position in several ways. You can use the Next or Previous buttons to adjust the video’s current position by 10 seconds. You can also enter … Continue reading

Posted in controls, graphics, multimedia, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment

Make a WPF button template in C#

The example Control a video with the WPF MediaElement in C# uses attractive button images, but those images still sit on top of rectangular buttons. The images were generated by the example Make video control buttons in WPF and C#. … Continue reading

Posted in controls, graphics, multimedia, wpf | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment