473,725 Members | 1,993 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to play a sound from an embedded resource file? (.resx file)?

I have the latest version of Visual Studio 2008 Professional, which
allows you to create resource files (this is the .resx file, no?),
unlike the Express version, which does not.

I am trying to cut and paste code that MSDN recommends for playing a
simple wav file from inside an embedded file, like presumeably the
'resources' file .resx is. I want to embed the .wav file in a
'resource file' since I don't want the user storing the file on their
hard drive.

Using the Wizard, and clicking on various links, I was able to create
a resource file (.resx file?) that plays a small sound, 25 kb, that I
call "mywav.wav" (it plays this sound when you click on the icon for
the audio file in Visual Studio, in the .resx file and accompanying
files*). The .resx file only has this wav in it, nothing else, and
the .resx resource file is called "myaudio.re sx".

I used the below code, which is pretty generic, but I cannot get
anything but a small 'ding' (which I think is the default Windows
error sound), but not the sound of "mywav.wav" . I tried various
permutations of the string. Apparently this ADO.NET type language is
not strongly typed since it compiles with no problems, but it doesn't
run right...what is wrong?

RL

* I notice the .resx file is in XML format and contains a string for a
"PublicKeyToken ". Perhaps, since I've never used this before, I need
to somehow log in for Visual Studio under my Administrator account (I
am using XP as the OS), and reset something?

//a class method declared and used inside of form Form 1, from an
object instantiated as "myClassObj ect"

public void playSoundFromRe source(object sender, EventArgs e)
{
System.Reflecti on.Assembly a =
System.Reflecti on.Assembly.Get ExecutingAssemb ly();
System.IO.Strea m s =
a.GetManifestRe sourceStream("< myaudio.resx>.m ywav.wav"); //<--note
string--is this correct?
SoundPlayer player = new SoundPlayer(s);
player.Play();
}
// I use it on a button in Form form 1--when I click on a button, the
mywav.wav does not play, but a small 'ding' does...why?

private void button1_Click(o bject sender, EventArgs e)
{
myClassObject.p laySoundFromRes ource(sender, e);
}
Aug 24 '08 #1
8 14940
You don't say where you got the code from but, I just add the wave file to
the project. In the properties for the file you can set the build action to
"Embedded Resource", then use the code you have to get the file into the
player.

This line: a.GetManifestRe sourceStream("< myaudio.resx>.m ywav.wav");
should be: a.GetManifestRe sourceStream("P rojectNamespace .mywav.wav");

"raylopez99 " <ra********@yah oo.comwrote in message
news:b8******** *************** ***********@f36 g2000hsa.google groups.com...
>I have the latest version of Visual Studio 2008 Professional, which
allows you to create resource files (this is the .resx file, no?),
unlike the Express version, which does not.

I am trying to cut and paste code that MSDN recommends for playing a
simple wav file from inside an embedded file, like presumeably the
'resources' file .resx is. I want to embed the .wav file in a
'resource file' since I don't want the user storing the file on their
hard drive.

Using the Wizard, and clicking on various links, I was able to create
a resource file (.resx file?) that plays a small sound, 25 kb, that I
call "mywav.wav" (it plays this sound when you click on the icon for
the audio file in Visual Studio, in the .resx file and accompanying
files*). The .resx file only has this wav in it, nothing else, and
the .resx resource file is called "myaudio.re sx".

I used the below code, which is pretty generic, but I cannot get
anything but a small 'ding' (which I think is the default Windows
error sound), but not the sound of "mywav.wav" . I tried various
permutations of the string. Apparently this ADO.NET type language is
not strongly typed since it compiles with no problems, but it doesn't
run right...what is wrong?

RL

* I notice the .resx file is in XML format and contains a string for a
"PublicKeyToken ". Perhaps, since I've never used this before, I need
to somehow log in for Visual Studio under my Administrator account (I
am using XP as the OS), and reset something?

//a class method declared and used inside of form Form 1, from an
object instantiated as "myClassObj ect"

public void playSoundFromRe source(object sender, EventArgs e)
{
System.Reflecti on.Assembly a =
System.Reflecti on.Assembly.Get ExecutingAssemb ly();
System.IO.Strea m s =
a.GetManifestRe sourceStream("< myaudio.resx>.m ywav.wav"); //<--note
string--is this correct?
SoundPlayer player = new SoundPlayer(s);
player.Play();
}
// I use it on a button in Form form 1--when I click on a button, the
mywav.wav does not play, but a small 'ding' does...why?

private void button1_Click(o bject sender, EventArgs e)
{
myClassObject.p laySoundFromRes ource(sender, e);
}
Aug 24 '08 #2
On Aug 23, 7:07*pm, "Family Tree Mike"
<FamilyTreeM... @ThisOldHouse.c omwrote:
You don't say where you got the code from but, I just add the wave file to
the project. *In the properties for the file you can set the build action to
"Embedded Resource", then use the code you have to get the file into the
player.

This line: a.GetManifestRe sourceStream("< myaudio.resx>.m ywav.wav");
should be: a.GetManifestRe sourceStream("P rojectNamespace .mywav.wav");
FTM--I tried your suggestion, and it failed.

After a lot of research on the net, I concluded it's probably a bug in
the Resource Manager of Visual Studio 2008, which is buggy. Others
are having the same problem. A quick and dirty workaround is to
abandon trying to use resource files, and simply externally reference
the audio .wav file.

Below is some simple code that works. When distributing your program
to users, just make sure the .wav file you want to play is found in
the same directory as the binary executable .exe file of your final
release.

The name of the file you would want to play below is called
"myWavAudioFile .wav" . This .wav file should be placed in the same
path as where the \bin\Release folder is in Visual Studio, which is
where your final release of the .exe executable of your program is
found. The string path_where_EXE_ file_Is will get the path string of
whatever directory the end user of the program has the program in. The
two strings are concatenated and used to set the .SoundLocation
property of the SoundPlayer. Don't forget to add try/catch blocks
(even if empty) to guard against the audio file somehow not being
present, which will cause an exception, and without the try/catch
blocks a system level exception that will stop your program.

RL

// this code works use library-- using System.Media;

try
{
System.Media.So undPlayer myPlayer = new
System.Media.So undPlayer();
string path_where_EXE_ file_Is =
System.IO.Path. GetDirectoryNam e(System.Reflec tion.Assembly.G etExecutingAsse mbly().Location );
string s = "\\myWavAudioFi le.wav"; //name of the audio wav
file to be played; don't forget the extra backslash, \\
string s1 =path_where_EXE _file_Is + s;
myPlayer.SoundL ocation = @s1;
myPlayer.Play() ;
}
catch
{
//optionally do stuff here if file not found, or just leave blank
//need to have try/catch blocks in case audio file not found,
otherwise throws a system level exception
}
Aug 24 '08 #3
Sorry what I suggested did not work for you. I don't know what you did that
I did not.

Your code should not need to set the file directory if it is in the same
folder as the executeable, as that is where it would open from by default.

"raylopez99 " <ra********@yah oo.comwrote in message
news:1b******** *************** ***********@j22 g2000hsf.google groups.com...
On Aug 23, 7:07 pm, "Family Tree Mike"
<FamilyTreeM... @ThisOldHouse.c omwrote:
You don't say where you got the code from but, I just add the wave file to
the project. In the properties for the file you can set the build action
to
"Embedded Resource", then use the code you have to get the file into the
player.

This line: a.GetManifestRe sourceStream("< myaudio.resx>.m ywav.wav");
should be: a.GetManifestRe sourceStream("P rojectNamespace .mywav.wav");
FTM--I tried your suggestion, and it failed.

After a lot of research on the net, I concluded it's probably a bug in
the Resource Manager of Visual Studio 2008, which is buggy. Others
are having the same problem. A quick and dirty workaround is to
abandon trying to use resource files, and simply externally reference
the audio .wav file.

Below is some simple code that works. When distributing your program
to users, just make sure the .wav file you want to play is found in
the same directory as the binary executable .exe file of your final
release.

The name of the file you would want to play below is called
"myWavAudioFile .wav" . This .wav file should be placed in the same
path as where the \bin\Release folder is in Visual Studio, which is
where your final release of the .exe executable of your program is
found. The string path_where_EXE_ file_Is will get the path string of
whatever directory the end user of the program has the program in. The
two strings are concatenated and used to set the .SoundLocation
property of the SoundPlayer. Don't forget to add try/catch blocks
(even if empty) to guard against the audio file somehow not being
present, which will cause an exception, and without the try/catch
blocks a system level exception that will stop your program.

RL

// this code works use library-- using System.Media;

try
{
System.Media.So undPlayer myPlayer = new
System.Media.So undPlayer();
string path_where_EXE_ file_Is =
System.IO.Path. GetDirectoryNam e(System.Reflec tion.Assembly.G etExecutingAsse mbly().Location );
string s = "\\myWavAudioFi le.wav"; //name of the audio wav
file to be played; don't forget the extra backslash, \\
string s1 =path_where_EXE _file_Is + s;
myPlayer.SoundL ocation = @s1;
myPlayer.Play() ;
}
catch
{
//optionally do stuff here if file not found, or just leave blank
//need to have try/catch blocks in case audio file not found,
otherwise throws a system level exception
}

Aug 24 '08 #4
Also, in the case you want the file along side the executable, add the .wav
file to the project and set the "Copy to output" property to "Copy always"
or "Copy if newer". I believe that a setup project will pick this up for
installing.

"Family Tree Mike" <Fa************ @ThisOldHouse.c omwrote in message
news:ur******** ******@TK2MSFTN GP05.phx.gbl...
Sorry what I suggested did not work for you. I don't know what you did
that I did not.

Your code should not need to set the file directory if it is in the same
folder as the executeable, as that is where it would open from by default.

"raylopez99 " <ra********@yah oo.comwrote in message
news:1b******** *************** ***********@j22 g2000hsf.google groups.com...
On Aug 23, 7:07 pm, "Family Tree Mike"
<FamilyTreeM... @ThisOldHouse.c omwrote:
>You don't say where you got the code from but, I just add the wave file
to
the project. In the properties for the file you can set the build action
to
"Embedded Resource", then use the code you have to get the file into the
player.

This line: a.GetManifestRe sourceStream("< myaudio.resx>.m ywav.wav");
should be: a.GetManifestRe sourceStream("P rojectNamespace .mywav.wav");

FTM--I tried your suggestion, and it failed.

After a lot of research on the net, I concluded it's probably a bug in
the Resource Manager of Visual Studio 2008, which is buggy. Others
are having the same problem. A quick and dirty workaround is to
abandon trying to use resource files, and simply externally reference
the audio .wav file.

Below is some simple code that works. When distributing your program
to users, just make sure the .wav file you want to play is found in
the same directory as the binary executable .exe file of your final
release.

The name of the file you would want to play below is called
"myWavAudioFile .wav" . This .wav file should be placed in the same
path as where the \bin\Release folder is in Visual Studio, which is
where your final release of the .exe executable of your program is
found. The string path_where_EXE_ file_Is will get the path string of
whatever directory the end user of the program has the program in. The
two strings are concatenated and used to set the .SoundLocation
property of the SoundPlayer. Don't forget to add try/catch blocks
(even if empty) to guard against the audio file somehow not being
present, which will cause an exception, and without the try/catch
blocks a system level exception that will stop your program.

RL

// this code works use library-- using System.Media;

try
{
System.Media.So undPlayer myPlayer = new
System.Media.So undPlayer();
string path_where_EXE_ file_Is =
System.IO.Path. GetDirectoryNam e(System.Reflec tion.Assembly.G etExecutingAsse mbly().Location );
string s = "\\myWavAudioFi le.wav"; //name of the audio wav
file to be played; don't forget the extra backslash, \\
string s1 =path_where_EXE _file_Is + s;
myPlayer.SoundL ocation = @s1;
myPlayer.Play() ;
}
catch
{
//optionally do stuff here if file not found, or just leave blank
//need to have try/catch blocks in case audio file not found,
otherwise throws a system level exception
}
Aug 24 '08 #5
Place the sound in the application resources as an embedded resource.

private void button1_Click(o bject sender, EventArgs e)

{

SoundPlayer sp = new SoundPlayer();

sp.Stream =
this.GetType(). Assembly.GetMan ifestResourceSt ream("PlaySound FromResource.ir _begin.wav");

sp.Play();

}

This works fine for me.
--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"raylopez99 " <ra********@yah oo.comwrote in message
news:b8******** *************** ***********@f36 g2000hsa.google groups.com...
>I have the latest version of Visual Studio 2008 Professional, which
allows you to create resource files (this is the .resx file, no?),
unlike the Express version, which does not.

I am trying to cut and paste code that MSDN recommends for playing a
simple wav file from inside an embedded file, like presumeably the
'resources' file .resx is. I want to embed the .wav file in a
'resource file' since I don't want the user storing the file on their
hard drive.

Using the Wizard, and clicking on various links, I was able to create
a resource file (.resx file?) that plays a small sound, 25 kb, that I
call "mywav.wav" (it plays this sound when you click on the icon for
the audio file in Visual Studio, in the .resx file and accompanying
files*). The .resx file only has this wav in it, nothing else, and
the .resx resource file is called "myaudio.re sx".

I used the below code, which is pretty generic, but I cannot get
anything but a small 'ding' (which I think is the default Windows
error sound), but not the sound of "mywav.wav" . I tried various
permutations of the string. Apparently this ADO.NET type language is
not strongly typed since it compiles with no problems, but it doesn't
run right...what is wrong?

RL

* I notice the .resx file is in XML format and contains a string for a
"PublicKeyToken ". Perhaps, since I've never used this before, I need
to somehow log in for Visual Studio under my Administrator account (I
am using XP as the OS), and reset something?

//a class method declared and used inside of form Form 1, from an
object instantiated as "myClassObj ect"

public void playSoundFromRe source(object sender, EventArgs e)
{
System.Reflecti on.Assembly a =
System.Reflecti on.Assembly.Get ExecutingAssemb ly();
System.IO.Strea m s =
a.GetManifestRe sourceStream("< myaudio.resx>.m ywav.wav"); //<--note
string--is this correct?
SoundPlayer player = new SoundPlayer(s);
player.Play();
}
// I use it on a button in Form form 1--when I click on a button, the
mywav.wav does not play, but a small 'ding' does...why?

private void button1_Click(o bject sender, EventArgs e)
{
myClassObject.p laySoundFromRes ource(sender, e);
}
Aug 24 '08 #6
On Aug 24, 5:34*am, "Bob Powell [MVP]" <b...@spamkille rbobpowell.net>
wrote:
Place the sound in the application resources as an embedded resource.

private void button1_Click(o bject sender, EventArgs e)

{

SoundPlayer sp = new SoundPlayer();

sp.Stream =
this.GetType(). Assembly.GetMan ifestResourceSt ream("PlaySound FromResource.ir _begin.wav");

sp.Play();

}
\

Thanks but this did not work either (I tried your version and a slight
variation, below***). The problem is with the resource editor of
Visual Studio--I've spent several hours today surfing the net and I've
seen a half dozen posts like mine, some from even more experienced
programmers, all pretty much having the same problem. I've installed
many different visual studios, going back to VS 98 I think, and they
all have not been disinstalled. Consequently the settings interfere
sometimes. For a while I had problems getting the Debugger to work,
when I installed Visual Studio 2008 Professional. It did not help
that I had installed the VS2008 Express (free) edition,which does not
have Resource file support (explicitly). In fact, this might be at
work now.

Further complicating things, I can use the Settings.Settin gs file OK
to store settings (very useful) inbetween an app being fired up, I can
set (change) the .ico file for the icon of a form, I can create (but
not use) bitmaps using the Resource Editor of VS08, I can see "loaded"
the values into the XML-format .resx file, and you can see the strings
holding the resources such as .wav, .bmp, etc, but I can't use them,
no matter what settings (typically "build action: embedded
resource"). I give up. Besides I'm starting to like putting the
graphics and audio files in a directory--it gives the user a feeling
of more control, and doesn't hide what is being use by the app. Sour
grapes perhaps.

Also another potential problem: perhaps I have to set up Strong-Name
Signing for Managed Applications, see http://msdn.microsoft.com/en-us/library/h4fa028b.aspx

Perhaps, since I'm just a ordinary User and not an Administrator, I
have to do this first from Admin account (using XP as an OS right
now).

BTW, I read on the net that Vista totally revamps audio, so anything I
learn now will be obsolete for WPF / Vista+ API, so I'm not going to
sweat it, though it would be nice to get the resource file working.

Thanks for your time.

RL
Here is the variation, as my .wav is called Chime (case sensitive)

*** SoundPlayer sp = new SoundPlayer();
sp.Stream =

this.GetType(). Assembly.GetMan ifestResourceSt ream("Chime.wav ");
sp.Play();
Aug 24 '08 #7
Hi FTM and Bob Powell,

I did get Resource File to play a sound (and I don't know how I
managed it either, but I kept plugging away), however, on occasion
(about every other play) the sound played has unacceptable distortion
and noise... some very high pitched sounds. Apparently others have
noticed this as well.

The only thing I could think of is that the audio stream perhaps is
not being shut down properly, and the garbage collection is not being
performed on the stream in time, and thus noise creeps in from the
system itself (just wildly guessing**).

Any suggestions appreciated. Below is the information including
another blogger, who mentions distortion and noise when playing sounds
embedded in the resource file. BTW this noise does not occur when I
"point" to a .wav file as I indicated in the 'hard coding' example
earlier, so it's unique to resource files containing audio.

RL

//both these versions 'worked' (but with occasional noise and
distortion)

//VERSION ONE

try
{

SoundPlayer sp = new
SoundPlayer(MyN ameSpace.Proper ties.Resources. MySound);

sp.Stream =
this.GetType(). Assembly.GetMan ifestResourceSt ream("MySound.w av");

if (MyNameSpace.Pr operties.Resour ces.MySound != null)
{
using (sp.Stream)
{
sp = new
SoundPlayer(MyN ameSpace.Proper ties.Resources. MySound);
//note: do not use extension .wav on MySound, just the name itself!
sp.Play();
}
}

Catch {}
/////////////////////////////////////////////////////

// VERSION TWO

try {

if (MyNameSpace.Pr operties.Resour ces.MySound != null)
{
using (MyNameSpace.Pr operties.Resour ces.MySound)

{
System.Media.So undPlayer myPlayer = new
System.Media.So undPlayer(MyNam eSpace.Properti es.Resources.My Sound);
//this was key: MySound.wav does NOT use the extension!
myPlayer.Play() ;
}
}

{

catch {}

////////// from a blog, talking about WPF 2008 audio distortion when
using a resource file, but equally applicable for WinForms ///////////
http://vbfeeds.com/post.aspx?id=5512

3. Audio File as Resource (Frustration #2)

I wasn't going to include this option because it has generally
caused me more trouble than it's worth (especially bearing in mind
that there are several relatively trouble-free alternatives).
However, you can add a wav file as a Project Resource as normal and
then play that Resource via a Stream.

Even with small, well tested files I often found that using this
approach I would get a lot of unacceptable sound distortion (actually
additional unrelated sounds to that expected). I have tried it on
several PCs, each with different sound card configurations and the
problems occur on them all.

////////////

** Yet another blogger mentions, in an unrelated post, how the C#
Garbage collector is aggressive and will collect garbage before going
out of scope, so perhaps this is a problem here? Just grasping at
straws--RL

"I wrote above that I initially thought that objects are destroyed
"somewhen after they go out of scope", but in reality it seems to be
far, far worse. As it turns out, the JIT compiler can do "lookahead
optimization", and may mark any object for collection after what it
considers it's "last use", ignoring scope!"
Aug 25 '08 #8
Since SoundPlayer has a Dispose method, you should call it or use it within
a using() block. That's the only thing that jumps out at me.

"raylopez99 " <ra********@yah oo.comwrote in message
news:05******** *************** ***********@k37 g2000hsf.google groups.com...
Hi FTM and Bob Powell,

I did get Resource File to play a sound (and I don't know how I
managed it either, but I kept plugging away), however, on occasion
(about every other play) the sound played has unacceptable distortion
and noise... some very high pitched sounds. Apparently others have
noticed this as well.

The only thing I could think of is that the audio stream perhaps is
not being shut down properly, and the garbage collection is not being
performed on the stream in time, and thus noise creeps in from the
system itself (just wildly guessing**).

Any suggestions appreciated. Below is the information including
another blogger, who mentions distortion and noise when playing sounds
embedded in the resource file. BTW this noise does not occur when I
"point" to a .wav file as I indicated in the 'hard coding' example
earlier, so it's unique to resource files containing audio.

RL

//both these versions 'worked' (but with occasional noise and
distortion)

//VERSION ONE

try
{

SoundPlayer sp = new
SoundPlayer(MyN ameSpace.Proper ties.Resources. MySound);

sp.Stream =
this.GetType(). Assembly.GetMan ifestResourceSt ream("MySound.w av");

if (MyNameSpace.Pr operties.Resour ces.MySound != null)
{
using (sp.Stream)
{
sp = new
SoundPlayer(MyN ameSpace.Proper ties.Resources. MySound);
//note: do not use extension .wav on MySound, just the name itself!
sp.Play();
}
}

Catch {}
/////////////////////////////////////////////////////

// VERSION TWO

try {

if (MyNameSpace.Pr operties.Resour ces.MySound != null)
{
using (MyNameSpace.Pr operties.Resour ces.MySound)

{
System.Media.So undPlayer myPlayer = new
System.Media.So undPlayer(MyNam eSpace.Properti es.Resources.My Sound);
//this was key: MySound.wav does NOT use the extension!
myPlayer.Play() ;
}
}

{

catch {}

////////// from a blog, talking about WPF 2008 audio distortion when
using a resource file, but equally applicable for WinForms ///////////
http://vbfeeds.com/post.aspx?id=5512

3. Audio File as Resource (Frustration #2)

I wasn't going to include this option because it has generally
caused me more trouble than it's worth (especially bearing in mind
that there are several relatively trouble-free alternatives).
However, you can add a wav file as a Project Resource as normal and
then play that Resource via a Stream.

Even with small, well tested files I often found that using this
approach I would get a lot of unacceptable sound distortion (actually
additional unrelated sounds to that expected). I have tried it on
several PCs, each with different sound card configurations and the
problems occur on them all.

////////////

** Yet another blogger mentions, in an unrelated post, how the C#
Garbage collector is aggressive and will collect garbage before going
out of scope, so perhaps this is a problem here? Just grasping at
straws--RL

"I wrote above that I initially thought that objects are destroyed
"somewhen after they go out of scope", but in reality it seems to be
far, far worse. As it turns out, the JIT compiler can do "lookahead
optimization", and may mark any object for collection after what it
considers it's "last use", ignoring scope!"

Aug 25 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1985
by: Cindy Liu | last post by:
Hi, I have a VS.Net project that has a resource file set as embedded resource. To compile the project via VS, I have no problem. But our build system uses compiler command, not VS.Net. How to set a resource file as embedded resource in the command line? Thanks in advance!!! Cindy
1
1797
by: thanigaimani | last post by:
Is it possible to Modify Embedded Resource? Like XML File
1
2237
by: Bruce | last post by:
I would like to store a text file as an embedded resource, and then at runtime read it in as if it were a text file on the hard drive. Is this possible? --Bruce
2
3713
by: Alex K. | last post by:
I need to play particular sound when user presses a button. I found PlaySound function in the Platform SDK, it works fine, but it can only play external wav file. I'd like to load my sound file into app resources and play it from there, similar to how I process image files. Any ideas? Thank you.
1
8003
by: Lam | last post by:
how can I play sound file in a .aspx page written in C#? I try to use the code like the following. But whenI call the play function play("sound.wav", this.SND_ASYNC) my computer give out "be" sound instead playing the file (same code works fine in a windows application written in c# , that mean there is nothing wrong with my sound card.) thanks ----------------------------------------------------------------------------...
3
3336
by: al | last post by:
Hi, I use a resource file (.resx) to store user's settings such as language and other strings. The problem i'm facing is that when the user changes one of the strings in the resource file, those changes are shown by VB.NET untill after the user reloads the app. Is there any work-around for this behavior so changes can appear without relaoding the app??
8
6075
by: Andreas Zita | last post by:
Hi Im creating my first 2.0 site and I cant find the Build Action property? I want to embedd an image-file in my site-assembly but I don't know how? In 1.1 I could set Build Action to Embedded Resource in the properties pane but this doesn't seem to be available any more??? /Andreas
5
2158
by: | last post by:
Hello, I am wrtting a program that does some sound effects... the files are stored in a subfolder in the application folder... and I check the existence of the files before calling the method to play the sound. It works perfectly well in Windows XP, but when I move my application to a Vista machine, the sound does not play... I used a debug statement to confirm that the files are seen in the code but somehow it does not play... If I use...
2
8724
by: steve | last post by:
I have the following routine for retrieving error message strigs from a resource file which is embedded in the project. But when it is called I get the error messsage "Could not find any resources.." shown underneath the code. The error message indicates that it is looking for resource ResourceExceptions.resource which is not what was embedded in the code by Visual Studio. The resource file is ResourceExceptions.resx. If I try to change...
0
8886
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8750
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9255
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8090
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6701
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6010
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3217
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2154
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.