Click here to Skip to main content
15,902,777 members
Home / Discussions / C#
   

C#

 
GeneralRe: garbage collector Pin
Luc Pattyn2-Nov-07 5:37
sitebuilderLuc Pattyn2-Nov-07 5:37 
AnswerRe: garbage collector Pin
Pete O'Hanlon2-Nov-07 0:54
mvePete O'Hanlon2-Nov-07 0:54 
QuestionUsercontrol : Creating arrayed Control Pin
amienc2-Nov-07 0:05
professionalamienc2-Nov-07 0:05 
AnswerRe: Usercontrol : Creating arrayed Control Pin
c0ax_lx2-Nov-07 0:34
c0ax_lx2-Nov-07 0:34 
QuestionSearch in the DataTable Pin
NewToAspDotNet1-Nov-07 23:56
NewToAspDotNet1-Nov-07 23:56 
AnswerRe: Search in the DataTable Pin
N a v a n e e t h2-Nov-07 0:01
N a v a n e e t h2-Nov-07 0:01 
AnswerRe: Search in the DataTable Pin
il_masacratore2-Nov-07 0:11
il_masacratore2-Nov-07 0:11 
QuestionBitmap and multiple threads Pin
Shaamaan1-Nov-07 23:30
Shaamaan1-Nov-07 23:30 
I'm doing a little thing, trying to write an application to draw fractals. I've got the complex numbers down, the algorithm is working.

But, it's taking a long time, so I figured "Hey! Why not use multi-threading?"

My idea is to have a Control task which creates and fills up a Queue with Points, reports progress and spawns and controls 2 more tasks (either Threads or uses a ThreadPool), which in turn do the calculations (they take the Point they need to work on from the Queue as long as the Queue isn't empty). By using the Queue, I'm 100% that the Threads never work on the same pixel; they only work on the Queue, and lock it when they need data.

But the problem is, even though they never work on the same pixel, they work on the same Bitmap object. Which is bad, because it cannot be accessed at the same time from multiple threads (even if they want something different from it).

I can't inherit the Bitmap (sealed), I can't inherit Image (internal constructor), so any attempts at creating my own image class have failed. The one that didn't involved a simple array of Colors, but recreating a Bitmap from that at the end takes way too much time.

So I'm in the dark... I don't know if there's a trick I could use to work with that Bitmap, or perhaps a different image class I could use (that can be easily drawn on a form)... Please help.
AnswerRe: Bitmap and multiple threads Pin
Guffa2-Nov-07 0:13
Guffa2-Nov-07 0:13 
GeneralRe: Bitmap and multiple threads Pin
Shaamaan2-Nov-07 4:15
Shaamaan2-Nov-07 4:15 
AnswerRe: Bitmap and multiple threads Pin
Guffa2-Nov-07 8:46
Guffa2-Nov-07 8:46 
QuestionCrystalreportview scroll selected group to top of page Pin
c0ax_lx1-Nov-07 23:26
c0ax_lx1-Nov-07 23:26 
Questionreplacing tags in template Pin
stephan_0071-Nov-07 23:17
stephan_0071-Nov-07 23:17 
QuestionChanging DataColume Datatype!! Pin
Navneet Hegde1-Nov-07 22:37
Navneet Hegde1-Nov-07 22:37 
Questiondouble precision problem Pin
Seraph_summer1-Nov-07 22:21
Seraph_summer1-Nov-07 22:21 
AnswerRe: double precision problem Pin
il_masacratore1-Nov-07 22:33
il_masacratore1-Nov-07 22:33 
AnswerRe: double precision problem Pin
Malcolm Smart1-Nov-07 23:04
Malcolm Smart1-Nov-07 23:04 
QuestionCosole Delegates Pin
new2pgrmg1-Nov-07 22:03
new2pgrmg1-Nov-07 22:03 
AnswerRe: Cosole Delegates Pin
Guffa1-Nov-07 22:13
Guffa1-Nov-07 22:13 
GeneralRe: Console Delegates Pin
new2pgrmg1-Nov-07 22:23
new2pgrmg1-Nov-07 22:23 
AnswerRe: Console Delegates Pin
Guffa1-Nov-07 23:20
Guffa1-Nov-07 23:20 
QuestionHow to detect a file if it is locked by another process Pin
vuthaianh1-Nov-07 22:01
vuthaianh1-Nov-07 22:01 
AnswerRe: How to detect a file if it is locked by another process Pin
kalyan_24162-Nov-07 0:38
kalyan_24162-Nov-07 0:38 
AnswerRe: How to detect a file if it is locked by another process Pin
Jimmanuel2-Nov-07 2:45
Jimmanuel2-Nov-07 2:45 
QuestionCan I cast process to instance of an object ? Pin
eyosha1-Nov-07 21:30
eyosha1-Nov-07 21:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.