 |
| How to play AVI file on the _screen |
User rating: 0/10 (0 votes) | |
|
|
 |
 |
| Before you begin: |
 |
Custom class Tavi plays AVI files on main FoxPro window using API functions from avifil32 and msvfw32 libraries. Audio stream is not processed only to make this example more simple.
See also:
Scrolling text on the form horizontally (a newsreel)
Scrolling text on the form vertically (a movie cast)
Shaking VFP form controls
Displaying animated images
Form Magnifier

|
 |
 |
| |
| |
Members area. Log in to view this example. |
|
| |
|
|
|
|
|
 |
User rating: 0/10 (0 votes) | |
| 6583 bytes Created: 2003-12-01 21:50:31 Modified: 2009-12-09 09:40:35 Visits in 7 days: 190 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| My comment: |
 |
Any other window can be used as a target (or a silver screen, if you like) for playing AVI files: FoxPro form, Windows desktop etc. Use that window handle instead of the handle obtained through the GetActiveWindow in the code above.
Technically, you can even play AVIs on a MessageBox window, once you know its window handle (examples 424 and 434 explain how to obtain such handle).
Note that on the last sample, the DrawFrame method either stops playing the AVI or resumes it from the first sample, depending on the nonstop property.
The set of DrawDib functions used in this example can be substituted with a call to the StretchDIBits.
* * *
Transparent AVI Player Control
* * *
Playing multimedia files in .NET code is a snap. Once you download and install DirectX SDK (merely 450 Mb) you are almost done. |
 |
 |
| Word Index links for this example: |
 |
|
|
 |
 |
| Translate this page: |
 |
|