|
He's multi-threading too!
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Basudevkuet wrote: how i can store voice in text form.. i,e take a voice by microphone and convert it into text...
There's a Speech API that you can use to "recognize" what word would sound similar to the sound of the microphone.
Basudevkuet wrote: please give me source code...
This is a site for programmers, the people who come here are expected to write their own code. If you want to learn more on speech recognition, go here[^]
I are Troll
|
|
|
|
|
Is it possible to identify the person's speech??? if it is possible,, please help how is possible i, e the process and source code.... please help me
|
|
|
|
|
CP link here[^].
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
No it is not possible, thats why we all communicate via online forums. No one in the world has acually spoken to another human since 1988.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
how i store a a voice into text form... please give source code.
|
|
|
|
|
It's all here[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
i need to add some items to a listbox in another thread and another class.
The secont thread passes a ListBox item to the invoking function but i cannot access its listbox.items.add functionality. I can only set values to the common parameters to all Controls (i.e. text, name etc.) How could this be solved?
ty
|
|
|
|
|
Create a custom event (and custom EventArgs object). Put the string/item into the EventArgs object and handle the event in the desired location.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
... and avoid cross-thread problems with the techniques from this article[^].
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
It seems multithreading is being taught in class this week.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: It seems multithreading is being badly taught in class this week
FTFY
If Barbie is so popular, why do you have to buy her friends?
Eagles may soar, but weasels don't get sucked into jet engines.
If at first you don't succeed, destroy all evidence that you tried.
|
|
|
|
|
Hi all,
I am refering this[^] article of CodeProject for learning about Windows Services.
Everything went right, but when i tried to Start the service from Services option of Administrative Tools, it is showing me following error:
"The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security."
on this line of code
if (!System.Diagnostics.EventLog.SourceExists("SimpleSource"))
Service is not starting.
Can anybody tell my why this is happening?
Thanks,
Nagendra.
|
|
|
|
|
Maybe it has to do with the user account you installed the service under.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
backgroundWorker1.RunWorkerAsync(mdiForm);
void worker_DoWork(object sender, DoWorkEventArgs e)
{
mLoadForm = new LoadForm
{
StartPosition = FormStartPosition.Manual,
Location = mNewLocation,
TopMost = true
};
mLoadForm.MdiParent = ((MdiForm)e.Argument);
Application.Run(mLoadForm);
}
When I try to set the MdiParent for the loadform by passing the mdiform thru the RunWorkerASync parameter, the Application.Run(mLoadForm) is never reached nor is there an error being thrown ...
This should be possible right?
|
|
|
|
|
You're attempting to do Application.Run within a background worker??!
I don't know what would happen if you do that, but its going to be weird.
Regards,
Rob Philpott.
|
|
|
|
|
If i replace Application.Run(mLoadForm) by mLoadForm.Show() then the Form isn't displayed corretly (I'm running an animated gif in that form)
Bu that doesn't change the fact that I cannot set the MdiParent....
|
|
|
|
|
Also, please explain why this "will be weird", because I didn't notice anything "weird" ...
|
|
|
|
|
Well, Application.Run is traditionally used from the main() entry point to the application. It creates a standard message loop on the current thread which then responds to user input and rendering requests and the like.
It's certainly normal to only have one such message loop, so using two (concurrently) opens up the dubious world of not having a single GUI thread. I've not seen it done before (except in modal dialogs etc.) And although it *may* be possible to use it, its certainly not the correct approach IMO.
You might end up with MTA/STA problems maybe as well.
Regards,
Rob Philpott.
|
|
|
|
|
But that was the purpose: I wanted to create a thread that contains another form while the other was currently busy.So I could show an animated gif in front of the form that is busy...
This seemed to be working great, except that if u minimize or moved the 'busy' form, the form in the new thread with the animated gif stays on screen, so I thought by setting the mdiParent would solve this, but apparently this can't be done...
I will change my design and let the main form do its work async so I can just put a picturebox in front till the work has been done or something ...
|
|
|
|
|
Also thanks for your input
|
|
|
|
|
No problem. I think that's the correct approach to go. You may be familiar with the notion of 'only the thread that creates a window can access it'. This means that you can never create another window on a seperate thread then make that a child of one on another.
If the two windows are completely seperate, you could use two Application.Run()s, although I'd explicity create a thread to do this and call that on it.
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: his means that you can never create another window on a seperate thread then make that a child of one on another.
This makes a lot of sense. Thank you !
|
|
|
|
|
Because you cannot do UI stuff, like creating forms and showing them, on anything other that the app's startup thread, also known as the UI thread.
I do NOT care that "it works for me!". You or, more importantly, your customers WILL eventually find a problem that only shows up under certain circumstances that you're not going to be able to duplicate and, if you do, will be very weird and nearly impossible to track down.
You just do NOT do it if you want your app to be as stable as possible.
You're going about this backwords. You do not keep the long-running work on the UI thread in your main form. You move THAT work to a background thread, freeing up the UI thread to handle putting up a "progress" form and updating it.
UI stuff stays on the UI thread. Actual work stuff goes on background threads.
Using an MdiParent form to do this is just silly.
|
|
|
|
|
Dave Kreskowiak wrote: You're going about this backwords. You do not keep the long-running work on the UI thread in your main form. You move THAT work to a background thread, freeing up the UI thread to handle putting up a "progress" form and updating it.
I already had come to that conclusion if u had read everything.
Dave Kreskowiak wrote: Because you cannot do UI stuff, like creating forms and showing them, on anything other that the app's startup thread, also known as the UI thread.
It IS possible, I had a form popup in front of my main form , created on another thread, with the Application.Run , and I had never ever got an error or something 'weird', because all it did was simply popup, show animated gif and close again.And I have this tested for weeks now...
|
|
|
|