Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > can you play avi in your form1


Reply
 
Thread Tools Display Modes
  #1  
Old 07-30-2003, 02:13 PM
drlector drlector is offline
Newcomer
 
Join Date: Jul 2003
Location: wigan,england
Posts: 13
Smile can you play avi in your form1


hi

i have tried many code to make avi's play in my program but all of them seem to open its own box to play it in .

is it possible to make the avi play within the form i have created



please help
Reply With Quote
  #2  
Old 07-30-2003, 02:56 PM
dragnut's Avatar
dragnut dragnut is offline
Contributor
 
Join Date: Feb 2001
Location: North Carolina
Posts: 514
Default

Add a microsoft multimedia control and a picturebox to a form, and paste the following in the forms module...
Code:
Private Sub Form_Load() MMControl1.FileName = "c:\avifilename.avi" 'path of the avi file MMControl1.hWndDisplay = Picture1.hWnd MMControl1.Command = "open" End Sub Private Sub Form_Unload(Cancel As Integer) MMControl1.Command = "stop" MMControl1.Command = "close" End Sub

Shawn
Reply With Quote
  #3  
Old 07-30-2003, 04:42 PM
drlector drlector is offline
Newcomer
 
Join Date: Jul 2003
Location: wigan,england
Posts: 13
Default

cheers dragnut


just what i wanted


btw: how would i go about making it play automaticaly
is it possible
Reply With Quote
  #4  
Old 07-30-2003, 04:47 PM
VBCODEX's Avatar
VBCODEX VBCODEX is offline
Centurion
 
Join Date: Jun 2003
Location: Far away from you
Posts: 119
Default

Code:
'try adding this on the forms load event MMControl1.Command = "play"
__________________
You never realise a mistake until you've made the mistake
[VBc0deX]
Reply With Quote
  #5  
Old 07-30-2003, 04:52 PM
drlector drlector is offline
Newcomer
 
Join Date: Jul 2003
Location: wigan,england
Posts: 13
Default

cheers vbcodex

perfect...............



btw:when i run my avi i get no sound and also it seems like it may be running to fast.

any idea's

cheers
Reply With Quote
  #6  
Old 07-30-2003, 11:27 PM
siu siu is offline
Centurion
 
Join Date: Mar 2002
Location: San Pedro Sula, Honduras
Posts: 108
Default Cool!

Cool! I tried it. If you could answer me 3 questions it will be of great help. (Or anyone who can)

1.) How can I capture snapshots of the video? (is there a property of getting the pictures / frames presented on the picture1 control?

2.) How can I record the avi into another file (including audio) ?

3.) Can the source of the video not be a file but a wdm source?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to play a mp3 file?! bramme DirectX 3 12-01-2002 04:58 PM
need help with dim as form1 gizmo83 General 36 07-19-2002 07:45 AM
how do i make this midi code play for the length of the song, like how2 detect length aaa General 1 07-04-2002 07:23 AM
Play CD using McisendString Alex API 1 06-26-2002 02:11 PM
how to make form1 to come before other windows yuler General 5 03-26-2002 06:48 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->