yes as you know, all word that we say, more or less, have a average in a frequency scale, but not wory, indeed I star now a project for do many things using this topic "sound", when I finish this a post that...
If you just want to play WAV sound files, you can use System.Media.SoundPlayer. If you want to do advanced things like changing the frequency of sound files, you'll need to go outside the .NET framework for that. You can use DirectSound, part of DirectX. You could probably also use DirectShow, which is part of the PlatformSDK. There are DirectShow wrappers for .NET on this site if you care to search the articles.
I have several MDI child windows for my application. These show up in the Windows list dropdown menu when I open them. When the user clicks on the X to "close" the child window, I just want to hide it so I capture this in my FormClosing event handler for each of them doing this:
if (e.CloseReason == CloseReason.UserClosing)
e.Cancel = true;
Which hides the child window just fine, however, when I want to redisplay it, clicking on the appropriate control to call Show() for that window, it displays just fine but I don't get an entry in my Windows list dropdown menu for that item.
How do they get into your drop down list to start with ? That's obviously where the problem is.
Well, I believe I just followed the steps outlined in the MS documentation to do this. I set my main form's IsMdiContainer property to true. I added a menustrip via the designer. The entries are added by setting the MdiWindowListItem property of the menuStrip to the desired menu item (In my test case, "windowToolStripMenuItem") from within the designer and then I call the following when I want form2 to show:
form2.MdiParent = this;
The problem seems to me to be when I handle the FormClosing and set e.Cancel = true. I don't know what is going on behind the scenes to manage the list of windows that show up in the menu. I can call Hide() on form2 from its parent window, form1,and when I use the control to show form2 again it shows up in the window list as I would expect.
I am writing an application which has two text boxes (call them A and B). B is a hexdump representation of the text in A. So far, so good. What I want that when text is selected in A the corresponding hex characters are highlighted in B, and vise versa.
I started with TextBoxes, but I needed to know when the selection in one box changed and TextBox doesn't tell you this. RichTextBox has the SelectionChanged event - perfect - so I switched to RichTextBoxes.
But now, whenever my selection extends beyond a space, RichTextBox starts selecting the entire word(s). I can't get it just select what I drag the cursor over. I have checked the AutoWordSelection property and it is set to false - I even checked it at runtime to see if had changed, but it is false at the moment my selection is being changed.
Does anyone have any ideas? Can this #!&^ "feature" be turned off in RichTextBoxes? Or can I go back to TextBoxes and get notification of a change to the selection?
Hello. Right now I admit defeat and don't know how to do this. I have a configuration file that I have to load at runtime and interpret. This works fine for all the settings in the appSettings sections but I don't know how to get the value from the system.diagnostics section.
This is an example of an config file (in "real" a lot bigger;))
To load the file I use the OpenExeConfiguration method and most of the data I can get to, but not the "Trace" value from the system.diagnostics.
<code>// Get the configuration file.
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration("c:\\projext1.exe");
MessageBox.Show(config.AppSettings.Settings["Hello"].Value); //this shows OK
ConfigurationSection sel = config.Sections["system.diagnostics"]; // Here I find the section, but then... ???</code>
Does anybody have any idea on how to get the value? A possible solution might be to load the file into XML, but I'm still hoping on using the Configuration object. Hope you can stand my bad english and thanks to enybody that have a suggestion.
Be sure that you are: using System.Diagnostics
Then, in your code, you can use the configured switch by creating a TraceSwitch with the same name as in your config file: TraceSwitch appSwitch = new TraceSwitch("Trace", "");
The value you want to retrieve is appSwitch.Level (which in your case will be Verbose, as you have the value set to 4 in your config file.
I think what he is referring to is creating your own custom control that will draw the graphics how you want using the Graphics object provided in the OnPaint method of UserControls.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.