No sound when running this application... HELP!! And conversion to VB.NET

Dear EE,

First Question.

Above is a link of a simple virtual piano program using DirectX...
I downloaded it....
I have Microsoft Visual Studio.NET 2003/DirectSDK Summer 2004

The problem is when I builed the program.... THere were no sounds when I press the virtual keyboard keys...
Can someone help me out??

Second Question.
Just a very simple question... If I want to convert my C# to VB.NET files.. Is it all I need to do is just convert all the *.cs files to *.vb ( I mean just changing their language platform using for example "" ) right??

Thanks.. Your help will be highly appreciated..

Who is Participating?
existenz2Connect With a Mentor Commented:
I had another look at it and I found this in the code:

string strFileName = @"c:\ding.wav";

So it wants to play that file, but the author forgot to include it in the project. Therefor the application returns an error on:
applicationBuffer = new SecondaryBuffer(strFileName, desc, applicationDevice);
because it cant find the file.

I tried replacing it with a different .wav file, but the I got an error saying the value was not in the expected range, so you'll need to play a bit with all the settings to get it to work.
First question:
The piano application is made for DirectX 9, so it possible doesnt work with lower versions

Second question:
Yes, only thing you need to do is convert the C# to VB.NET and the application should still work without extra changes.
joely2kAuthor Commented:
Dear existenz2,

Did you tried the program?
My directx version is : DirectX 9.0c (4.09.0000.0904)   as I checked from dxdiag.....
I even have DirectX SDK (summer 2004) installed.... I still dont know why it cant be played... :(
joely2kAuthor Commented:
YEAH~~ Thanks you so much... creditability to you..
becos when I builed.. I cant see any error thats why I cant debug and dunno whats wrong...

My last question on the conversion....
Your reply
Second question:
Yes, only thing you need to do is convert the C# to VB.NET and the application should still work without extra changes.

How bout the csproj?? It means we create a whole new vbproj and then just add in the forms/classes/modules... then each of them are the *.vb files itself... the results of the conversion just paste into them right?
It should be possible to convert the csproj file to an vbproj file, but I'm not sure how to do that. If it cant be done just add the converted .vb files (or code) into a new project and it should work again.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.