Adding Sound

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Ok, well I've goten used to the new Forms, and learned C#, but now I'm sitting here with one last task to occomplish
Adding Sound!
Well, this is harder than it seems. I've tried looking around MSDN Online for some example, but nothing good came up. Can anyone help me with this, or point me in the right direction.
 
To add sound you should look at the following;

- System.VisualBasic.Compatibility
it has a beep method which does what it says...
- Interop
This is a little harder but gives you more.
I don't know which one you should use at the moment, but
you might want to look at the MCI api's.

Hope it helps.

--

Poolbeer (MCP)


littlecooldude said:
Ok, well I've goten used to the new Forms, and learned C#, but now I'm
sitting here with one last task to occomplish.
Adding Sound!!
Well, this is harder than it seems. I've tried looking around MSDN Online
for some example, but nothing good came up. Can anyone help me with this, or
point me in the right direction.
 
Ok, well I've goten used to the new Forms, and learned C#, but now I'm sitting here with one last task to occomplish.
Adding Sound!!
Well, this is harder than it seems. I've tried looking around MSDN Online for some example, but nothing good came up. Can anyone help me with this, or point me in the right direction.

It's nice to know optimists still exist :-))

There's no native sound in C#. The following is a prototype for
the API call:

[DllImport("winmm.dll")]
public static extern int PlaySound(string lpszName, IntPtr
hModule, int dwFlags);

You can find out how it works from the (unfiltered) help,
although, of course, you may be aware of it if you program in
C/C++.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top