I know how to play an audio file using the SoundPlayer class, but I have only been able to play one sound at a time. If I am playing a sound, and I try to play another sound, it stops the first one to play the second one. And that is with two separately declared SoundPlayer objects. So, is...
I am using c#/.NET with GDI to program my version of the classic snake game where the snake moves around trying not to crash, and everytime it eats something it gets longer.
I started off with just a solid background color:
this.BackColor = Color.SomeColor;
And I got pretty high speeds out of...
I know this is kind of a crazy question, but in Python when I make a string with a path to a file, I can use os.sep which means that if it is being used in Windows it's the "\" character and in Linux/unix it's the "/" character. Is there anything like this in c#?
The reason I'm asking is...
I have a form where a certain button plays an audio file that is about 3 seconds long. I am using System.Media.SoundPlayer.PlaySync() because I don't want the user to do anything while the audio is playing. So my code is something like.
button.Enabled = false;
MySound.PlaySync()...
I have a program that is set up with a button that when the cursor enters it, the button is set insensitive, an audio file plays, then it is set sensitive again. My problem is that if the cursor remains inside the button during this time, when it becomes sensitive again and I click the button...
I am using Python in Ubuntu Linux with pygtk. In my program I use os.getcwd() to get the current working directory to load image files to show in my window. I have no problems when I either run the program from the command line, or if I run it from nautilus. But I made a link to the program...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.