Need help with Visual BASIC 6 for a final project

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
USSEnterprise
Youngling
Posts: 90
Joined: 2005-09-18 12:05am

Need help with Visual BASIC 6 for a final project

Post 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?
User avatar
Faqa
Jedi Master
Posts: 1340
Joined: 2004-06-02 09:32am
Contact:

Post 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.
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.

Periodic Pwnage Pantry:

"Faith? Isn't that another term for ignorance?" - Gregory House

"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House

"This is usually the part where people start screaming." - Gabriel Sylar
nickolay1
Jedi Knight
Posts: 553
Joined: 2005-05-25 12:42am
Location: Marietta, GA

Post 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.
USSEnterprise
Youngling
Posts: 90
Joined: 2005-09-18 12:05am

Post by USSEnterprise »

After VB, I find myself perfering C
I am a member of PETA
People for the Eating of Tasty Animals
User avatar
Solauren
Emperor's Hand
Posts: 10392
Joined: 2003-05-11 09:41pm

Post by Solauren »

You do know with the right coding, you can include C in VB, right?
Post Reply