Click here to Skip to main content
15,914,222 members
Home / Discussions / C#
   

C#

 
AnswerRe: Acess a file from network using Username and password Pin
Keith Barrow17-Oct-11 0:18
professionalKeith Barrow17-Oct-11 0:18 
GeneralRe: Acess a file from network using Username and password Pin
venu65617-Oct-11 0:21
venu65617-Oct-11 0:21 
Questionhow to add mp3 to my projects and played it with visual c# Pin
X9X16-Oct-11 23:15
X9X16-Oct-11 23:15 
SuggestionRe: how to add mp3 to my projects and played it with visual c# Pin
Richard MacCutchan17-Oct-11 0:25
mveRichard MacCutchan17-Oct-11 0:25 
GeneralRe: how to add mp3 to my projects and played it with visual c# Pin
X9X18-Oct-11 21:15
X9X18-Oct-11 21:15 
GeneralRe: how to add mp3 to my projects and played it with visual c# Pin
Richard MacCutchan18-Oct-11 22:32
mveRichard MacCutchan18-Oct-11 22:32 
AnswerRe: how to add mp3 to my projects and played it with visual c# Pin
JP_Rocks20-Oct-11 3:24
JP_Rocks20-Oct-11 3:24 
GeneralRe: how to add mp3 to my projects and played it with visual c# Pin
X9X20-Oct-11 9:33
X9X20-Oct-11 9:33 
I don't want my mp3 file accessible to anyone else.

I want to do the following in VisualStudio C#:

1. Right click my project and select -->Add Existing Item. Select my mp3 file.

2. Then in the Properties of my mp3 file change the Build Action to "Embedded Resource".

This now means that my mp3 file is contained inside my exe whenever its built.


But now I don't know how to access this mp3 file to played it. I can access (bitmaps ,gif, wave file) when they are embedded by using the code at the bottom my original post but it does not seem to work when I use it for the mp3 file.

Do you understand what my problem is?? Do you know how to solve it??
and this is the cod :
(for Images)
System.Drawing.Bitmap bitmap1 = resource.Properties.Resources.gif//(or bitmaps);
pictureBox1.Image = resource.Properties.Resources.gif;
(for wav)
SoundPlayer sndplayr = new SoundPlayer(resource.Properties.Resources.wav //(here mp3 not played ));
sndplayr.Play();
who can help me with it please ... i look for it but cant find any help ...
Questionc#.net login pages Pin
sudheesh kumar s16-Oct-11 20:15
sudheesh kumar s16-Oct-11 20:15 
AnswerRe: c#.net login pages Pin
Anuj Banka16-Oct-11 21:12
Anuj Banka16-Oct-11 21:12 
AnswerRe: c#.net login pages Pin
OriginalGriff16-Oct-11 21:30
mveOriginalGriff16-Oct-11 21:30 
GeneralRe: c#.net login pages Pin
sudheesh kumar s17-Oct-11 0:04
sudheesh kumar s17-Oct-11 0:04 
QuestionBlack screens appears while pausing video of MediaElement Pin
anandvtra16-Oct-11 19:58
anandvtra16-Oct-11 19:58 
QuestionCreating Guid Pin
Member 827944516-Oct-11 18:09
Member 827944516-Oct-11 18:09 
AnswerRe: Creating Guid Pin
Mycroft Holmes16-Oct-11 18:43
professionalMycroft Holmes16-Oct-11 18:43 
GeneralRe: Creating Guid Pin
Member 827944516-Oct-11 19:32
Member 827944516-Oct-11 19:32 
GeneralRe: Creating Guid Pin
Mycroft Holmes16-Oct-11 20:16
professionalMycroft Holmes16-Oct-11 20:16 
GeneralRe: Creating Guid Pin
Member 827944516-Oct-11 20:18
Member 827944516-Oct-11 20:18 
GeneralRe: Creating Guid Pin
Mycroft Holmes16-Oct-11 20:26
professionalMycroft Holmes16-Oct-11 20:26 
GeneralRe: Creating Guid Pin
Member 827944516-Oct-11 20:35
Member 827944516-Oct-11 20:35 
GeneralRe: Creating Guid Pin
BobJanova16-Oct-11 22:37
BobJanova16-Oct-11 22:37 
GeneralRe: Creating Guid Pin
Member 827944516-Oct-11 22:42
Member 827944516-Oct-11 22:42 
GeneralRe: Creating Guid Pin
BobJanova17-Oct-11 5:23
BobJanova17-Oct-11 5:23 
GeneralRe: Creating Guid Pin
Mycroft Holmes16-Oct-11 20:45
professionalMycroft Holmes16-Oct-11 20:45 
GeneralRe: Creating Guid Pin
Member 827944516-Oct-11 20:51
Member 827944516-Oct-11 20:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.