Page 1 of 1
Need help with Visual BASIC 6 for a final project
Posted: 2006-01-04 10:15pm
by USSEnterprise
My programming class is winding down, and I am writing my final project. It is a basic Star Trek scrolling game where you shoot down the oncoming ships. Now I wanted to use a small video clip to show when you have lost. I chose a clip from TNG "Cause and Effect" where Picard is screaming "All hands abandon ship". Now, how can I insert this clip into a form and have it play?
Posted: 2006-01-05 04:39pm
by Faqa
msdn.microsoft.com
Everything you'll ever want to know about an MS programming language.
But, quite frankly, you'll probably have to dig into the ugly API for this one. It's not a thing done lightly.
Try this link for a little help....
Oh, and don't worry. When you start using .NET, it's all MUCH prettier.
Posted: 2006-01-05 06:53pm
by nickolay1
One way of doing it (as is done in C, for instance)is to embed the video file into the resources, load it into memory during runtime, and finally play it from memory.
After a quick googling, I found the following:
http://64.233.161.104/search?q=cache:Rk ... Data&hl=en
Code: Select all
Option Explicit
Private Const WM_USER = &H400&
Private Const ACM_OPEN = WM_USER + 100&
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Any) As Long
Private Sub Command1_Click()
Dim ResID As Long
ResID = 101
SendMessage Animation1.hwnd, ACM_OPEN, App.hInstance, ResID
End Sub
It appears to be far more simple, with the Animation ActiveX control handling most of the tough stuff.
Best of luck with the project.
Posted: 2006-01-06 01:20am
by USSEnterprise
After VB, I find myself perfering C
Posted: 2006-01-06 02:04am
by Solauren
You do know with the right coding, you can include C in VB, right?