Go Premium for a chance to win a PS4. Enter to Win


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

Posted on 2004-10-30
Medium Priority
Last Modified: 2010-04-15

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 "http://www.kamalpatel.net/ConvertCSharp2VB.aspx" ) right??

Thanks.. Your help will be highly appreciated..

Question by:joely2k
  • 3
  • 2
LVL 14

Expert Comment

ID: 12454658
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.

Author Comment

ID: 12455891
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... :(
LVL 14

Accepted Solution

existenz2 earned 300 total points
ID: 12456177
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.

Author Comment

ID: 12457653
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?
LVL 14

Expert Comment

ID: 12457931
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.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question