This sample shows the use of the thumb buttons in the Windows task bar to play or pause a video in a Delphi/C++ application.
You can find the VideoPlayer sample project at:
- Start | Programs | Embarcadero RAD Studio Alexandria | Samples and then navigate to either:
- Object Pascal\VCL\Taskbar\VideoPlayer
- Subversion Repository:
- You can find Delphi and C++ code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.
How to Use the Sample
- Navigate to Start | Programs | Embarcadero RAD Studio Alexandria | Samples and open:
- Delphi: VideoPlayer.dproj
- C++: CPPVideoPlayer.cbproj
- Press F9 or choose Run > Run.
This project has one source file (Unit3 for Delphi and Unit4 for C++), which contains the class for the main form.
- TForm3, the form class, implements the main visual component of the application. It contains a TMediaPlayer component and a TTaskbar component to reproduce videos.
- The main form contains a TMediaPlayer component to reproduce a video and a TTaskbar component to control it.
- The TTaskbar component has two TThumbBarButton, and you can click on them to play and pause the video.
- The TActionList component defines the actions for the TThumbBarButton.