Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old October 20th, 2004, 06:35 AM
lvfrenchflair lvfrenchflair is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 5 lvfrenchflair User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Showing a video

Hi,

I'm trying to add a video to my program so that when I click on a particular button on a toolbar or on a menu item etc. it shows a video. I've used the Open command before, but this seems to only open files to enable things to be added or changed or read, it doesn't actually show the file running.

Any ideas how I can get my video to play?

Thank you!

Reply With Quote
  #2  
Old October 23rd, 2004, 01:42 PM
antiachusIV antiachusIV is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 1 antiachusIV User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
This code will not stream your media file to the program itself but it will allow you to have VB send the file to your default media player and begin playing.
Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
		(ByVal hWnd As Long, ByVal lpOperation As String, _
		 ByVal lpFile As String, ByVal lpParameters As String, _
		 ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
----------------------------
Private Sub Command1_Click()
ShellExecute Me.hWnd, "Play", "(your file's path goes here)", vbNullString, "C:\", SW_NORMAL
End Sub
----------------------------


note that there are other ways of acheiving this including only putting the file name in the lpFile String and placing the rest of the directory in the lpDirectory String, it works either way. Hope that works for you.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Showing a video


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway