|
You'll have to walk the hierarchy of Controls as each Control itself has a Controls collection. For menus, groupboxes, and things of that sort that can contain other controls you cannot access the internal controls from the Form's Controls collection directly; rather, through the Controls collection of the container itself.
Keep It Simple Stupid! (KISS)
|
|
|
|
|
I found a good and understood answer to this question: Items of ToolStrip and MenuStrip aren't controls, so that's the reason why it doesn't work to run through the control collection, even if it's recursive.
I have to choose the right handling after getting the type of control and run through the type of what ever is in it. For me it's not an ideal solution, but there isn't a general solution for all types, I guess.
|
|
|
|
|
Hi,
I have developed an application that processes WAV (PCM) files in C#. My issue is that it is possible to get compressed wave files in GSM format as well. What can be the best way to convert them to PCM, programmitcally, so that I can use them with my application. There seems to be a few options like using winmm.dll or audio compression manager. Unfortunately I couldnt find relevant resources for properly using these in C#. Any pointers in the right direction will be much appreciated. Thanks
Kind Regards,
Fahd
|
|
|
|
|
Just done a quick google search,and is seams like SOX[^] is the easiest.
Apparently to do .gsm to wav you just need
sox -V in.gsm -s -w <code>out.wav
where in.gsm is your gsm file and out.wav is the new wav.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi
Thanks for your reply Dave, but I want a way to do it within my application. My application is a multithread app that will be handling multiple wav streams coming in so probably can't use the sox exe as well. Is there any other way?
regards
Fahd
|
|
|
|
|
You should be able to use the exe using Process.Start / ShellExecute either passing the commands as arguments, or creating a bat file with the commands in and running that from your app, or creating a wrapper around the relevant dlls (if there are any?).
If none of those work, or don't appeal - the source code is available (in C, not C#) for sox. You can study that and write your own .net implementation.
Either one could prove to make an interesting subject for an article!
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I have 2 threads, one application thread and the workflow foundation thread. My application thread now throws an exception, but the try-catch-block is in a method that is called in the workflow thread. The problem is, this exception is not caught in the try-catch-block. I am wondering if it is possible to somehow marshal the throwing of the exception to the workflow thread. Does anyone know this?
|
|
|
|
|
I have some javascript with activeX object. For setting parameter value of this activex object this code is used:
ObjectCache = new ActiveXObject("Shell.ObjectCache");
ObjectCache("variableName") = "value";
How can I write my assembly that will work with code above?
I know that assembly uses default method if this helps.
|
|
|
|
|
The ShowDialog(IWin32Window) may take a Form object instance as its parameter.But the Form doesn't implement IWin32Window interface.
Anyone can explain it?
Thank you very much!
|
|
|
|
|
Form class inherits from ContainerControl class which inherits ScrollableControl which in turn inherits from Control which ...
I hope you can continue from here and find out answer to your question
|
|
|
|
|
Thank you very much for so quick reply!
|
|
|
|
|
You are welcome
|
|
|
|
|
You're saying that the Form class doesn't implement the IWin32Window interface?? Uhh, yes it does. Form gets it from the Control class that Form (eventually) inherits from. Here's the entire inheritance tree for Form:
Class Object
Class MarshalByRefObject
Class Component (IComponent, IDisposable)
Class Control (IOleControl, IOleObject, IOleInPlaceObject,
IOleInPlaceActiveObject, IOleWindow, IViewObject, IViewObject2,
IPersist, IPersistStreamInit, IPersistPropertyBag, IPersistStorage,
IQuickActivate, ISupportOleDropSource, IDropTarget, ISynchronizeInvoke,
IWin32Window, IArrangedElement, IBindableComponent,
IComponent, IDisposable)
Class ScrollableContainer (IArrangedElement, IComponent, IDisposable)
Class ContainerControl (IContainerControl)
Class Form
|
|
|
|
|
Dave ,thank you very much for so clear explanation!
|
|
|
|
|
Dear All:
How to set the background color of the Scrollbar of DataGridView with C# in the WinForm ?
Many thanks!
|
|
|
|
|
You don't. They're drawn using the system colors. There is no direct way to change the scroll bar colors since the DGV class doesn't expose any properties to change this.
|
|
|
|
|
hi
i need login form coding in c# i.e in web applicatio
|
|
|
|
|
can you elaborate it in little detail?
There is login control provided in ASP.NET 2.0.You can use it if it suffice.
Cheers!!
Brij
|
|
|
|
|
|
sanddepnamburi wrote: i need login form coding in c# i.e in web applicatio
nice to know that
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
It's pretty straightforward. Make a form, add the necessary controls, query the database against what the user has entered in the textboxes, ... What else you need?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
|
login with the use of sql store procedures.
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Hi,
Iam writting a c# DLL for users login. Here i need to get the machine name of the client who is accessing my class. In case if we are designing a website we can write the following code to get the machine name
string[] aStrComputerName = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName.Split(new Char[] { '.' });
string strMachineName = computer_name[0].ToString();
But I cant use this code in C# class because Request.ServerVariables is not supported in c# class.
Can any body help me to solve this problem.
Its Very urgent. Thanks in Advance.
Regards,
Suresh Kumar G
|
|
|
|
|
You can use Environment class.
surigu wrote: Its Very urgent.
It's urgent only for. CP members don't reply to posts based on how urgent it is. They just want to share their knowledge and help newbies so it really doesn't make difference if it's urgent for you or not.
|
|
|
|