.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How can i play short sound when im over the button in C#?

Posted By:      Posted Date: October 17, 2010    Points: 0   Category :Windows Application
i want, whenever i was over the button in C#, short sound will play
I,m CRAZY about learning NEW things.

View Complete Post

More Related Resource Links

adding play / stop button to a simple slide show


Hi guys,

I got the following code with the help of raghav khunger and I wanna add a play and stop button on it to cycle the pictures orderly and stop them. how can I do that?

<%@ Page Language="C#" %>

<%@ Import Namespace="System.Web.Services" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <style type="text/css">
            width: 100px;
            height: 100px;
            width: 400px;
            height: 300px;
    <form id="form1" runat="server">
    <asp:Image ID="imgMain" CssClass="main-image" runat="server"  ImageUrl="http://www.clubalbuquerque.com/files/images/15%20Random%20Greenery.JPG"/>
    <br />
    <div id="thumb-container">

WPF button with short cut character access no longer possible?


I defined a string like "&OK" is my resource file.

if i do normal WinForm application, with a button that I do button.text = Properties.Resources.OK, my button will appear with a text "OK" with a short cut key underlined O on it.

However, if i do it in WPF, i would set my button with button.Content = Properties.Resources.OK?? then my button in WPF will appear as &OK

How to overcome this problem?

Please help me. THanks


1 + 1 = 3

Play Sound on Notification Pop Up


Hi All,

I wonder is it possible to play a sound  for example when i have a notification pop up?

If so please kindly assist.

Thank you in advance.

Warmest Regards,


How to make menus play Menu Popup sound

Programming in C# for .NET Framework 3.5:

I've noticed my Windows Forms menus (ToolStripMenuItems on a MenuStrip) do not make proper menu popup sounds when they open (a problem curiously shared by many flagship Microsoft applications, lately). How is this remedied? Is there just some flag I need to set somewhere? Or am I going to have to make a subclass of <some-ToolStrip*-class > and override <whatever-method-that-executes-when-menus-pop-up > so it properly makes sound? A bit of a daunting task for someone new to the language/library, however necessary.

If in fact the latter is necessary, any suggestions regarding the best class+method to override for the purpose?  Keeping in mind that I'd also like menu popup sounds for context menus, too.

UserControl: Change image and play sound on MouseDown using only XAML?



I am trying to develop a UserContorl which shows an image that changes and plays a sound when MouseDown is raised. This is my UserControl:


<UserControl x:Class="Jugues.contacteButton"

Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

Maintain HTML Radio Button Selection Inside GridView After Postback

Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.

A Simple and Extensible Radio Button Style GridView

The GridView is one of the significant controls in ASP.NET 2.0 and later versions. No doubt it reduces a lot of work time. However, customizing the GridView control is not an easy task. For example, it's hard to add a radio button column to the GridView. This article demonstrates the reason why a radio button column cannot act as normal and how to create a simple and extensible radio button GridView.

Short Overview of SharePoint Features in Visual Studio 2010

As you probably know, Visual Studio 2010 was announced earlier this week and it contains a lot of cool features and project templates for SharePoint developers. Below is a short overview for some of the SharePoint development related features and project templates.

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code

Radio Button Event

Here I have explained the events of radio button with javascript.
Let me explain the scenarion first,
We are having two radio button say radioobtn1 and radiobtn2. If I click on the button 1 then I need to show one DIVor FORM. same as when I click on radiobtn 2. I have given the code for the above scenarion.

Play video


Hi to all 

 I have asp.net 2.0 & VS 2005. I want to play a video file in my web application, is there any control for this else help me how to play video in browser. Is this complex ?

Problem with Dynamic Button


Hi friends,

I am trying to make a page inspired from http://login.qlikview.com/help.aspx

here I have made a dropdownlist and on clicking I am able to dynamically add the textboxes and radio buttons using placeholders. My problem is I am not able to use a dynamic number of submit buttons. In the page (link above) I need to make the submit button available for two choices and invisible for one.  But the option dynamicbutton is not available alike dynamicTextboxes etc. What could I do? Is there any other way I could figure out to implement this.

Thanking you in advance,


replacing ok and cancel button of an alert message with YES an NO button in asp.net web application.


i want to replace ok and cancel button of an alert message with YES an NO button in asp.net web application.When a user will click yes the data will be saved in the database and if user clicks that will act as a reset button and do not save the data in database and the control will move with as usual to the redirect page.Any pointers will be highly appreciated.I am usin g C# language.

Run Button Behavior: Suggestion/Bug


Note: This could be a bug or considered as suggestion. I am not looking for solution.

1: I have ImageWatermark.cshtml open and currently in focus.

2: I have Photo1.jpg selected in left Files workspace.

3: Now if I Click "Run", instead of opening ImageWatermark.cshtml it trys to open Photo1.jpg and it fails.

So ideally I would expect the "open file (ImageWatermark.cshtml) to run rather than running the selection from Workspace.

Button specific code


I have 2 submit buttons on my page. Right now, the only way to run the code behind with razor is to to If(IsPost). Since I have 2 buttons, how would I destinguish between the two in post? Is there a way to request a button that sent a post request?  

Html Link Button


Hi All,

I would like to create a html link button(in aspx page) so that the page could not post back and some controls to display on clicking link button.

Can any one of you help me regarding this issue?

Let me know if you have any queries.



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend