Game Programming :: Sound Files - Use .exe On Another Computer It Doesn't Play Because It Does Not Recognize .wav Location
Jan 17, 2010
To programming and have a question with sound files. I am trying to figure out the basics and here is what I did: I created a button that is supposed to play a sound.
My.Computer.Audio.Play("C:.......file.wav")
When I click this button in my .exe file it obviously plays because I am using the computer with the above location for the .wav file. When I use the .exe on another computer it doesn't play because it does not recognize that .wav location. How do I make this work for me? Do I need to embed the .wav with my .exe somehow?
On programming assignment without having any real experience in vb. I guess I don't understand subroutines that well. When the program runs it never goes to the computer's turn and does not update the users score either. This assignment is already in but would like to know what is going wrong. Using VB 2010, and this is windows application.
Code: Public Class Form1 Dim Myturn As Integer Dim Computerturn As Integer
i am trying to develop a program which will:to beging with, allow a user to use the left and right arrow keys to control the panning of a particular sound on loop. the actual panning dosent have to be programmed i could just instruct the program to play out the corresponding pre recorded panned sound?once achieved i hope to then develop the program to test a users ability to pan one sound to match a stationary sound at a given angle. i will need to record the time taken to achieve this, the number of key presses made and how accurate their answer was.i am using visual studio 2005 to build my program?
Whilst developing a game (for the PocketPC, but it also works on a PC) I have created a function which should act as the move the computer, as oponent player, should make. The game-grid is build as a variable square of 'buttons' and the computer does calculate the correct 'button' to select. My problem now is how to implement this into the code correctly.
I have a picture box and I tell it to appear on a random location on another specified larger picture box.
here's my code:
Code: Sub P2_AppleMove() Dim P2ax As Integer = CInt(Int((P2Foodarea.Width * Rnd()))) ' sets the random area of the food
[Code]....
P2foodarea is a large picture box I created. I only want the apple to spawn on P2Foodarea, atm, it spawns on P1Foodarea which is very weird. P1foodarea is a whole other picture box. I even made new variables as you can see P2ax and P2ay, but it still doesn't spawn on P2Foodarea. I have even tried recreating a new picture box for P2foodarea
I'm trying to find out when the ball strikes the paddle. So what I did was made two rectangles, one around the ball and one around the paddle.
[Code]...
The problem is, the ball goes right through the paddle!!!! Shouldn't the ball deflect off the paddle and move in a new direction depending on angle? Why does the ball go right through the paddle?
-A button (called "btnplayvoice") -A textbox(multi-line enabled, called "txtinput") -Some *.wav audio files in my "resources" (2 of them called "A.wav" and "B.wav", of course there are still some more sound files in my resources xD)Note: the button and the txtbox are in the same form.
i want to make a program with this feature:When I type "B A"(note between "B" and "A" has a space)into txtinput, then i click the btnplayvoice, it will look up and check the resources and see if the wav file exists there, if yes, it will play the related(same as inputed) sound files one by one in correct order. That mean in this case I should hear "B.wav -> A.wav" in this order.
how can i get it to play other files besides just .wav, like .mp3. wave files are way too large to be used easily if you want a good quality. why cant i play .mp3 files with it?when i convert a 2.1 mb mp3 file to .wav it turns out to be 36 mb?any other ways besides computer.audio to play audio files on command?
I am using sound files in my project it is saved to my usb so when I use another computer I have to chang the location of the sound file I was wondering if there is a way so that when my project is put in to use the sound file location dose not have to be changed I mean is there a way to save it in to the prohere is my code
Private Sub frmplay_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load My.Computer.Audio.Play("F:\computer science\comp4\comp4\bin\song1.wav")
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.
I have background sound loop with the My.Computer.Audio and it works fine. I want to play another sound (like a beep) when desired without stopping the background sound. Several examples I have found don't seem to work. I am in VB.NET 2008 Professional.
I am trying to build a small program which will allow some one to click on the exit button and the sound will play and at the end of the sound the program will then close. The sound clip is about 3 seconds long Here is what I have:
Imports Microsoft.DirectX Imports Microsoft.DirectX.DirectSound Public Class Form1 Private Dsound As CSoundDevice
I'm pretty new to VB and I chose a project for school to recognise the pitch/note of a sound comming from my microphone (Which I'm using singular notes using my Guitar). I have no idea if this is even possible :/ So if possible, what things should I be considering and what I pretty much need to do to get the ball rolling for me
im trying to make a game in visual basic in which your character can move around, jump, and kill things. I can get the picture box with the character to move and everything is fine. but i did run into one problem. when the character moves over a tree (or something) you can see the gray backround of the character as i made in paint. how do i make the backround of the picturebox transparent?
I have created a scrabble game that generates random letters. For the user to type in a word using the random letters they have to type it in a text box.
I want my program to prevent users from typing in letters that are not provided in the text box and to allow them to type in the random letters that are provided.
I'm trying to make a simple fruit machine game for windows mobile device.
I can create the game easily enough and flip through pictures in a picture box to display the correct symbol.. but what I'd like to do is do a proper spinning reel, but have no idea where to even start.
What I have is a list of images in an imagelist (or individual files) - what I'd like is them attached to each other and moving downwards, preferably as though it were going around a drum but just them moving would be a start.
I am trying to make a game which basiclly lets you shoot ducks. i have a picture as a background (set as form image) i then have picturebox's with ducks flying flying around you shoot them the disapear etc.
My problem is the image. i have a picture of a duck and a blue square round it. and i would liketo make it transparant because birds dont fly with blue squares.
Below is an image to illistrate my problem
I have tried adding transparent background, transparant key etc
Upon changing the field size a game should restart. Upon trying to do so I see the previous grid (e.g. 10x10) displayed on top of the new one (e.g. 4x4). How would I prevent this and indeed start the game fresh?
So here is my problem. I have a vb game with animated sprites and all, and the character even jumps. However it only works in the y direction. So if i'm moving, he stops in place and jumps, instead of jumping forward. I was wondering if someone knew how to make him move at the same speed forward during the jump.
I currently have a who wants to be a millionaire game that I have made in visual basic 2010. Each question is in its own form. Form1 opens at the start, and question 1 is opened by a button click on Form1. The user has to click on the picture box at the side to show the text for the question each time. If they answer incorrectly, it displays a message box, opens an input box asking for their name, and goes to the form with the high score list, Form17.
Upon opening Form17, I want the scores to load and be displayed in the list box. The high scores are saved in a text file at C: est.txt . Upon clicking menu or end, the high scores are saved to the text file.
I m writing a video poker style game. the form consists of the player's 5 cards, a deal button, a hold button for each card, a button to select amount to play that hand. im using Visual Basic 2008 Express Edition.
I have written an vb.net application, named vbapp.exe. And I would like to use vbapp.exe to shell an external .exe file and this external .exe will create a file in the folder in which the external .exe file is located.However, the external .exe file will not recognize its own folder, on the contrary, it will think that its own folder is where the vb application, vbapp.exe, is located.
I have a country map in a picture box with provincial divisions. I can fill each province on mouse over by calling following floodfill function on my pictureBox MouseMove event[code]...
im struggling to work out the code for 3 of a kind in my yahtzee game, i think that if i can work this out i can sort my everest of the full house code!
I am all new to Visual Basic 2008, I am trying to create a picture shuffle game, the problem is I cant seem to be able to move one picture from PictureBox1 to PictureBox2 onClick, here is a Code I written earlier:Sub ChangePicture(ByRef P1 As PictureBox, ByRef P2 As PictureBox)