❔ Implementing sound file into program
Hello, am coding a tool. Modding tool so to say and my issue is that I can't get the sound file for a "click" implemented correctly.
I checked the name now so often but its just right, the file itself is working as well and the hook is there as well must makes issues.
I can provide as well more code, if necessary.
7 Replies
You probably want this method if you need a bytearray: https://learn.microsoft.com/en-us/dotnet/api/system.resources.resourcereader.getresourcedata?view=net-7.0
it appears that the resource named "MouseClick.wav" does not exist in the application's resources folder... But its definitly there... I am looking throught it.
Now this works now. BUT once i load up my tool, i already get conformation "sound file is not there or null"
once i press the button, again. SO there's something messed up.
Still am not able to get it working. Its really tough. Maybe something simple again.. who knows.. always the same.
The file is
MouseClick.wav
and the resource name you're trying to use is MouseClick_Sound.wav
Maybe that's why?
I never used Winforms thoughNah i actually figured that out, haha.
Its like am trying switching alot of techniques, but none of'em are really working. didn't knew this could be such s time sink ^^
that folder called resources is different from the project resources afaik (also dont use winforms)
right click your project and click properties and select the resources tab
well instead of using Winforms what alternatives do i have?
WPF could be also the key, BUT its another whole topic ^^
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.