|
yeah mr. Pattyn it would be very nice of you
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I don't have too much expirence with writing to the console, so I'm having a hard time picturing what its actually doing. Assuming the load 2 is working and staying in one place, but load 1 is not, could it have something to do with the fact that on load1 you are not resetting the cursor position each time the for loop "ticks" but are in load 2? I'd imagine that load one goes through the loop the first time correctly, but then the next 50 times through it starts pushing the cursor to (0,3) (0,4) ect.
"You're damned if you do, and you're damned if you dont" - Bart Simpson
|
|
|
|
|
No, actually both load1 and load2 are workin simultaneously, but while execution the load2 is goin on executing while load1 is workin in the background! this is what irritating me!!
LINTO
|
|
|
|
|
Ah. I'm not really sure what the goal of the program is, but whenever I've done multi-threading apps I generally run into security and cross-threading errors. I've found (at least from a GUI) that it's sometimes easier to create an event handler and then fire the event from the background woker thread. I believe you still need to invoke the event though. Here's a good article on multi-threading: C# Multithreading
Hope it helps
"You're damned if you do, and you're damned if you dont" - Bart Simpson
|
|
|
|
|
Both the threads are perfectly working!!!! The problem lies with the cursorposition.
Because the load2 function changes the cursor position every time.
Have a Happy Coding.....
|
|
|
|
|
hello sir,
can you please tell me, How to run two threads simultaneously? It is a bit urgent!
LINTO
|
|
|
|
|
Don't bother, we will write the code and send it to you for free.
Ok, enough sarcasm. Here is where you start.[^]
Read that, get your hands on it. When you have issues or need more help on a particular area of the multithreading, post your question here.
|
|
|
|
|
|
see this[^] if you want the source code for it
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Thread.Start();
Thread Start();
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
How can it be a bit urgent? Isnt that like being a bit pregnant?
|
|
|
|
|
J4amieC wrote: Isnt that like being a bit pregnant?
not at all. He wants an almost prompt delivery.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hello Masters,
Can you just put some light on which is the best way to invoke function's from a Win32 dll?
I have already studied the following ways:
Solution A: Create Bridge Functions and Use PInvoke.
Solution B: Create a Bridge DLL in Managed C++. If we don’t have the source code for the dll’s this approach would be better.
Also do we need to write a wrapper for each and every function a WIN32 dll exposes?
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
If you are calling small amount of functions or performance is not very critical you can use P/Invoke approach. If performance is an issue, use managed c++
|
|
|
|
|
so you suggest to write a wrapper for the exposed functions from the dll in managed C++ before using them? I knowthat the number of functions in the C++ dll are more than what you would call manageable.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Hi,
I use P/Invoke to call native code. When I am in charge of the native code's API, I keep it as simple as possible, so not to rely on automatic marshaling which tends to cause data copying if one isn't careful.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I don't have the API's code available as well. Not being a C# developer can you please make me understand what is automatic marshalling and how can it be implemented.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
either do some research, or ask a specific question, or both.
calling Win32 API functions is handled rather well at this PInvoke site[^]
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Thanks for your reply. Will prefer investigation
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
_AnsHUMAN_ wrote: Create a Bridge DLL in Managed C++. If we don’t have the source code for the dll’s this approach would be better.
You are using C++/CLI right? C++/CLI supports C++ Interop and it is more preferable than P/Invoke. So I think Solution B is going to be good.
_AnsHUMAN_ wrote: Also do we need to write a wrapper for each and every function a WIN32 dll exposes?
I think, you only need to wrap functions that you use. Take a look at Nish's C++/CLI in Action, it covers these topics.
|
|
|
|
|
Hi Guys,
Can anyone give me the download link for Microsoft Expression Blend (MEB) and by the way, whats the size of the Setup?
Your help will be appreciated,
Rajdeep.NET
|
|
|
|
|
You can dowload a 30-day trial here[^] (it's 200Mb big).
For the full version you have to pay 500$[^]
|
|
|
|
|
Friends,
I want to compare an image file which contains text with a text file.
Is it possible? If so, could you please help me in achieving the same.
Thank,
Snu
|
|
|
|
|
You mean a text in an image need to copmared with a string????
IF this is the case then you need to go for image recognition systems.....
(Not such an easy task as easy to say).....
Have a Happy Coding.....
|
|
|
|
|
Hi
I dont mean text in an image. I have a TableLayoutPanel and i have added label controls to the each cell of its 1st column.Also i have used a listview control to display the list of all files from a directory.For a design purpose, i want the name of the file to be displayed in the 1st label in the 1st cell of the table when i select any file name from the listview control.Similarly when the 2nd item from listview is selected it should appear in the 2nd label.
Currently i have a design which has a mapping like when i select on the 1st filename it appears in the 1st label,2nd file name in the 2nd label...the drawback that i face here is that suppose if by random i select 5th filename from listview it appears on the 5th label.
I hope im making myself clear.Please help me with this
|
|
|
|