Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

AVI Using API Function Calls

Posted on 1999-07-13
7
Medium Priority
?
195 Views
Last Modified: 2013-12-25
Can anyone tell me how to display an  AVI video in a VB 5 program using API functions, also
l want the video to run full screen “No surrounding borders or  MAX\MIN buttons”  and to
then shut automatically.

regards Kevin
0
Comment
Question by:608
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 10

Expert Comment

by:caraf_g
ID: 1495293
1 Change the form's border style to 0 - none
2 Change the form's window state to 2 - maximized
3 Stick an OLE on your form
4 Point it to the correct AVI file
5 Paste the following code:

Option Explicit

Private Sub Form_Load()

Me.OLE1.Action = 7

End Sub

Private Sub OLE1_Updated(Code As Integer)

End

End Sub

0
 

Author Comment

by:608
ID: 1495294
Thanks for you input, but l really want to achieve this using  API

regards Kevin.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 1495295
why?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:608
ID: 1495296
l have an Safety Induction Program l have written at my
workplace, it contains video and audio files, it takes
new employees through a series of topics before they are
introduced to the work environment, the audio files are played using API functions.

So l wanted to know if it was possible to achieve the same
for Video.

regards Kevin.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 1495297
I see. It probably is, but alas I'm not an API expert. I hope someone else will be able to help you out...

Good luck!
0
 
LVL 6

Accepted Solution

by:
sharmon earned 400 total points
ID: 1495298
I believe this might be what you are looking for.  Hopefully you find it is.  Also, it will play any type of video the system has mci support for such as Mpeg, etc...I have only given you the basics, you will need to add such things as what happens when the user hits escape and so on...

'----------Begin Code CUT HERE-----------------------
'Declares
Private Declare Function mciSendString Lib "winmm.dll" Alias _
"mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As _
String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long

'Code
Private Sub PlayAVI(aFilename As String)
Dim CmdStr$
Dim ReturnVal&
CmdStr$ = "play " & aFilename & " fullscreen"
ReturnVal& = mciSendString(CmdStr$, 0&, 0, 0&)
End Sub

Private Sub Form_Load()
' Just modify the path and filename as needed.
PlayAVI "e:\video\president.avi"
End Sub
'----------End Code CUT HERE-----------------------
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6821943
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.

This is the Community Support link, if help is needed, along with the link to All Topics since many new ones were recently added.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thanks,
Moondancer
Moderator @ Experts Exchange
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question