𝕬𝖓𝖌𝖊𝖑
𝕬𝖓𝖌𝖊𝖑
CC#
Created by 𝕬𝖓𝖌𝖊𝖑 on 9/4/2023 in #help
❔ Implementing sound file into program
WPF could be also the key, BUT its another whole topic ^^
17 replies
CC#
Created by 𝕬𝖓𝖌𝖊𝖑 on 9/4/2023 in #help
❔ Implementing sound file into program
well instead of using Winforms what alternatives do i have?
17 replies
CC#
Created by 𝕬𝖓𝖌𝖊𝖑 on 9/4/2023 in #help
❔ Implementing sound file into program
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 ^^
17 replies
CC#
Created by 𝕬𝖓𝖌𝖊𝖑 on 9/4/2023 in #help
❔ Implementing sound file into program
Nah i actually figured that out, haha.
17 replies
CC#
Created by 𝕬𝖓𝖌𝖊𝖑 on 9/4/2023 in #help
❔ Implementing sound file into program
Still am not able to get it working. Its really tough. Maybe something simple again.. who knows.. always the same.
17 replies
CC#
Created by 𝕬𝖓𝖌𝖊𝖑 on 9/4/2023 in #help
❔ Implementing sound file into program
once i press the button, again. SO there's something messed up.
17 replies
CC#
Created by 𝕬𝖓𝖌𝖊𝖑 on 9/4/2023 in #help
❔ Implementing sound file into program
Now this works now. BUT once i load up my tool, i already get conformation "sound file is not there or null"
17 replies
CC#
Created by 𝕬𝖓𝖌𝖊𝖑 on 9/4/2023 in #help
❔ Implementing sound file into program
// Define the resource name with type information (e.g., "MouseClick_Sound.wav")
string resourceName = "MouseClick_Sound.wav";

// Access the resource by name
byte[] soundBytes = (byte[])Properties.Resources.ResourceManager.GetObject(resourceName);

if (soundBytes != null)
{
// Create a MemoryStream from the byte array
using (MemoryStream memoryStream = new MemoryStream(soundBytes))
{
// Initialize the SoundPlayer with the MemoryStream
clickSoundPlayer = new SoundPlayer(memoryStream);
}
}
// Define the resource name with type information (e.g., "MouseClick_Sound.wav")
string resourceName = "MouseClick_Sound.wav";

// Access the resource by name
byte[] soundBytes = (byte[])Properties.Resources.ResourceManager.GetObject(resourceName);

if (soundBytes != null)
{
// Create a MemoryStream from the byte array
using (MemoryStream memoryStream = new MemoryStream(soundBytes))
{
// Initialize the SoundPlayer with the MemoryStream
clickSoundPlayer = new SoundPlayer(memoryStream);
}
}
17 replies
CC#
Created by 𝕬𝖓𝖌𝖊𝖑 on 9/4/2023 in #help
❔ Implementing sound file into program
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.
17 replies