VS 2008 Playing MP3 Files Through Code

Jan 2, 2010

I do not want to use a hidden player or anything. I want to play it through code.

View 5 Replies


ADVERTISEMENT

VS 2008 Playing Video Files?

Sep 10, 2009

im new to VB and i would like to ask some questions;Im developing a Media Study Room program and i have this little problem, My problem is that, how can i designate the video in the list box, that when i click variable on the list, it will automatically play the video i designated to a number and its description in the bottom will appear.

View 18 Replies

Playing MP3 Audio Files (And Not Using WMP)

Sep 27, 2010

Based on a thread earlier today, and in particular an answer that Cor gave wherein he
pointed to this article, I thought that I'd do some investigation. Many times here the question has come up about playing .mp3 audio files and NOT using the Windows Media Player object. In the article referenced above, he shows how this can be done via DirectX.

I've looked at DirectX before and it seemed ambiguous so I never really dug into it but it turns out to be pretty simple actually! I thought that I'd write this as a step-by-step of what I did so that maybe some of you will find use from it. The whole thing stems around using DirectX and to begin with, you'll need to download and install the SDK for it. If you haven't already,

try this link. Do be aware that it's a large download (about a half gig)! Once that's installed, create a form and add a reference to the class that we need for this. You can do this several ways, but the way I usually do is to right-click on the name in the Solution Explorer, then choose "Add Reference":

[Code]...

View 9 Replies

Playing MP3 Files From The Internet?

Jun 21, 2010

I want to play MP3 Files directly from the internet. I don't want to use other applications, like WMP, just my application.

I have a file that contains the list of the playable files: listoftracks.ini that contains:

hxxp://....../example.mp3

hxxp://....../example2.mp3

I wrote hXXp instead of http to disable links - in the files, they are http

Public Function Listen()
My.Computer.Network.DownloadFile("..../listoftracks.ini", Application.StartupPath & "/listoftracks.ini")

[Code]....

View 5 Replies

Playing Video Files (And Not Using WMP!)

Oct 3, 2010

This is tied in with the other discussion that I started last week about playing audio files using the DirectX classes. If you haven't yet had a look at that other thread,Using the same reference as in the audio application, let's set up a form for video this time. I started with a form that I then placed a split container on and in the lower panel of the split contatiner, I placed the buttons and other controls. Following is how I have mine set up:

Reread the thread on the audio player because the methods are very similar - in fact some are identical! However, this is video and it got a bit more involved as you might expect.The full code is here and I hope you'll find it useful to you. Following is a screenshot of the end result.

View 2 Replies

Playing 8 Mono .wav Files To 7.1 Speakers?

Jul 4, 2010

Is it possible to play 8 different and individual mono wave files to a 7.1 (8 channels) audio system using vb.net? (I undestand that the .1 speaker is the subwoofer and I'm not yet sure it can be replaced with an ordinary speaker.) The playing should start simultaneously and the files can be of different size/length.Is this something that should be done using win API functions if it can be accomplished at all.I just re-installed my old VB6 which I need to ugrade and vb.net would be the easiest for me so I placed this Q here.

View 2 Replies

Playing Audio Files In The Background?

Jan 29, 2009

I am working on an application in VB.net (.NET 2.0) where I need to open a dynamic amount of different audio streams. Normally, for audio files, one would suggest importing the Windows Media Player COM reference and adding a GUI-based element from the toolbox, but since I'll be working with a dynamic amount of these a GUI would be a terrible idea (especially with Tab stops).

View 4 Replies

Playing AVI Files So That They Work On XP, Vista And Win7

Jun 23, 2010

We have code in our former VB6 application, that ported fine to VB.NET, that plays a simple AVI file of the typical "flying folders" and "spinning maginfying glass" AVI. Under Windows XP, our application ran fine and everything was good.

Then we had customers start using Vista and Win7 and this stuff crashes. We were using the MS Common Controls (SP4) and then (SP6) - utilizing the Animation player. Now - these dont work and we get nasty errors.

I searched Microsoft and the web to answer the "what now?" question and though there are numerous suggestions, none of them work. We cant use Media Player because we dont want any menu - just the graphic. We dont know why, with the cool tools given in .NET, there is no animation player (seems a huge oversight...) But we need to get "unstuck" on this one, and we need that fast...

So, How does on play a simple AVI file using VB.NET code? What DLL or OCX does Microsoft recommend and is there a place we can find some sample code for it?

View 6 Replies

Playing Multiple And Overlapping Wave Files?

Jan 30, 2012

I'm trying to write a virtual piano program. Each key plays a sound from the resources directory.How do i play two(or more) sounds at the same time if ex two keys are pressed. Or start playing another sound while one is still playing.

View 2 Replies

Playing WAV / MP3 Files At Start Of Windows Form?

Apr 20, 2012

Been doing VB2010 for about a year now, have recently started to push the boundary's for what kind of media I can incorporate into my forms. I haven't been able to play .wav or .mp3 files though. I have tried to follow tutorials on microsoft and other coding websites without success.

View 1 Replies

VS 2010 - Playing Multiple Files From Array

Feb 26, 2011

I'm trying to make a "Simon" game with four buttons labeled 1-4. The game is supposed to read the numbers out loud, but i have a problem with that. I have 4 wav files from google text-to-speech, each named 1-4. I made an number generator that can return like this "42331", and the game is supposed to play 4.wav, 2.wav, 3.wav, 3.wav and 1.wav.

Here's what I got so far.
Public Class Form1
Dim rnd As New Random
Dim i = 0
Dim level As Integer = 5
Dim nums As String
[code] .....
It only plays 1.wav (the last in the sequence).

View 4 Replies

Game Programming :: Playing Wave Files In An Application

Nov 20, 2008

I have a program that speaks wave files. This works problemless with the Soundplayer class with the following code:

Sub MyPlayWav(ByVal WavFileName As String, ByVal StartPos As Long, ByVal EndPos As Long)
Dim wp as new SoundPlayer
wp.SoundLocation = WavFileName
wp.Play
End sub

The soundplayer does however not seem to have a method to play the wave from position StartPos to position EndPos and achieving just that would mean quite a reduction in downloads of these files.

The soundplayer does have a stream object, and that does have a seek method, suggesting that there might be a way to accomplish this, but how?

I plan to include other media files as I am developping the project, and I guess I will be confronted with the same problem.

View 2 Replies

VS 2010 : Deleting Files, Fonts From Resources, Playing Videos?

Jan 11, 2012

I am having a _ton_ of issues, and I am hoping some of you could clear it up...

1. OK So a while back someone showed me an example for fonts from resources, but I noticed if you close the window that it opens, The entire program shuts down... what can I do to fix it?Also, The fonts are not showing up on all computers, only this one....

2. I am trying to delete a image file, which the program downloads from the internet, and can change regularly, but when I try to delete it will not delete. It says its in use, and I cant figure out where.

3. I am trying to play videos using the following

vb
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
Const WS_CHILD As Integer = &H40000000

[code]....

Now, I have confirmed the files it is attempting to play are in fact valid video files. It refuses to play all but the last one.

View 3 Replies

VS 2010 Playing With MS Code Analysis?

Apr 1, 2011

I decided to try the Code Analysis tool that came with VB2010 (at some levels). It produced LOTS of fascinating comments. Many of the comments make no sense, such as one about not disposing of a type on all paths when there is only one path that ends with an explicit call to object.Dispose. I think the analysis engine is looking at some of the calls, but they all return to the caller properly.

[Code]...

View 15 Replies

What Code To Stop Flash Player From Playing

Dec 26, 2011

I add flash object to my form and i add button to play the movie using movie = "link here" work ok but i need to add stop button to stop the movie What the code to stop flash player from playing.iam using visual basic 2010

View 1 Replies

Video Playing Code In Button Click Must Stop For 5 Seconds?

Mar 15, 2012

i am doing an gaming project in vb.net 2008..my problem is i wrote code to play the video in button click,,so codes after the video playing code in button click must stop for 5 seconds how to do it?i cant use threading.thread.sleep(5000)if i use that then entire program execution will stop for 5 seconds if i use that then video will also stop playing.........

[code]...

View 8 Replies

[2008] Using C# And VB Code Files In Same Project

Feb 4, 2009

I have some rather largish classes that I wrote in C# that I want to include in a Visual Basic project. How would I do that (aside from transcription)?

View 13 Replies

Get Media Playing Now Playing Using Sendmessege / Wmp.dll?

Jan 22, 2010

How I can get the Media playing now playing using Sendmessege or wmp.dll?

View 5 Replies

Code To Load The Already Compiled Yahoo Files To Execute The Code Again, Without Having To Recompile The Code?

Dec 8, 2011

I have some code to execute code at runtime...

Here is the main

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
If TextBox1.Text.Trim <> "" Then
If TextBox2.Text.Trim <> "" Then

[code]....

When the button is pressed, it all works and the following files are created: yahoo.dll and yahoo.pdb My question is this: What is the code to load the already compiled yahoo files to execute the code again, without having to recompile the code?

View 1 Replies

VS 2008 Playing .WAV (32bit)?

Mar 9, 2010

I have code to play wave files.

Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Const SND_ASYNC = &H1
sndPlaySound(WAV_PATH, SND_ASYNC)

[code]....

which is my favorite because of the SEAMLESS loop which I cannot accomplish with the first code.However there is a problem.Both will play .WAV files of any frequency be it 44.1 or 48 so long as its 16bit. My problem is that I have .wav files which are 24 bit, and 32 bit. It is odd because these files play and can be made in a variety of audio applications, but when playback is attempted using the supplied code, nothing but silence!While I know how to re-encode the audio to a new bit depth, I need to play back these specific files.

View 4 Replies

VS 2008 Playing With Numbers

Feb 27, 2010

Could anyone tell me the logic or the code to do this scenario:I Have 10 numbers (they're in a list or any other), they're all randomized, e.g. {1,4,7,7,5,2,4,1,4,9}.Now there's a code to take all of those 10 numbers and take out paired numbers, they're two ones, two sevens, and three fours. So the program will delete the ones, sevens, and fours, but leaving one four because one is not paired up. Now they're only 4 numbers in the list {5,2,4,9}.

View 5 Replies

VS 2008 - Playing MP3 Over Certain Sound Device?

Nov 26, 2009

I've been looking for a way to play an MP3 file over a specific sound device for a while now and I just haven't been able to find any decent code examples in VB.NET. Basically I need a way to find and list all the sound devices on the system and then play an MP3 file over one of them. I have found code examples in C# and similar but I couldn't find any VB.NET code.

View 2 Replies

VS 2008 Playing Next Song In Listbox?

Sep 13, 2009

I have a listbox with a few songs in which i can click individually and play using the axwindowsmediaplayer1 control.But i would like it so that when one song finishes it moves down the listbox and plays the next song..i undertsand how to move down the listbox and play the next song however not sure how to detect if the song has finished?

View 3 Replies

Use The Time-code Data From A Wav File Or Know When A Wav File Is Playing?

Sep 18, 2009

My program turns on and off external relays from the parallel port. I need to find a way to activate the relay only while a wav file is playing and de-activate the relay when the wav file stops playing.

[Code]...

View 5 Replies

VS 2008 : Application To Get Any Sound Playing From Pc And Play It?

Dec 6, 2009

Is their a way for my application to get any sound playing from my pc and play it?

View 6 Replies

VS 2010 Make A Code That Unzips Files And Then Move Those Files Into Another Zip File?

Feb 23, 2012

How do i make a code that unzips files and then move those files into another zip file?

View 2 Replies

VS 2008 : Recording Location Of Clicks And Playing Them Back?

May 10, 2009

Im trying to make a program that will automaticly do something for me so what i want it to do is record clicks from when u press f12 say for example till u press f11 then i want it to play them back when i click a button so it clicks automaticly in place where i recorded the clicks i also want it to play over and over again. Can anyone help me get started because im not sure where to start i dont know much about simulating mouse click and mousing mouse automatically and also i dont know how i would do the F12 and F11 thing.

View 13 Replies

VS 2008 Making Several Digital Times In To Integers And Playing Around?

Nov 12, 2009

Ok lemme tell ya this is one toughie to explain. Basicly, I have a textbox with digital times on different lines, i.e

22:25
23:56
21:33

[code].....

View 5 Replies

VS 2008 Playing Camtasia Video In Web Browser Control

Dec 24, 2009

I have tried to play a Camtasia video inside a web browser control but it comes up with javascript needs to be enabled error on page. How can I work it or find a work around that? I'd like to have a listbox that contains the movies and they would play in the browser. I have a membership site that I'd like to have a player that authenticates the user before playing them but first things first, what is the best way to accomplish playing Camtasia videos inside a form?

View 25 Replies

VS 2008 Playing With The Designer - InitializeComponent - Forbidden Area ?

Sep 20, 2011

Alright so i have a form with alot (ALOT) of controls...many tabs, many listviews, many comboboxes and textboxes, all of which have values which i saveload using a class i made for saving and loading these values from a file.

Loading these values is pretty slow after the form loads. Takes around 3 seconds (i had to create a splashscreen and made it look decent, but it's still not a nice thing to have)

Then today i decided to try something. I opened the designer to initialize component, and i called the LoaderSub (that loads the values for the controls from a file) within initialize component, in a location after all the properties are set but before all the .resumelayout and .performlayout are called. Lo' and behold the form loaded in less than half a second, with the values and all.

However, now everytime i make a change to the form in design view, or even add a handler to some control in code view, the designer redraws and the auto generated code takes out my code from initializecomponent.

I did the googling, and all the results i found for similar cases issues were cases where the person asking the question im going to ask, the answer is "Didn't you read the part that says DO NOT MODIFY?"

Still, as a last attempt, I ask here: is there any way to modify initializecomponent without losing my changes? I just need to call LoaderSub before the layout resumes...if i call it before initialize component, i get null reference exceptions. And if i call it right after initialize component, loading is very slow.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved