|
You need to Enable visual styles in your EXE's code.
System.Windows.Forms.Application.EnableVisualStyles();
|
|
|
|
|
Hi Joshua,
thank you, it works perfectly!
Best regards,
Stefan
|
|
|
|
|
Am I allowed to distribute a .NET Framework installation pack along with my application?
Thanks in advance,
Shy.
|
|
|
|
|
Yes. But:
"If you need to have users install the .NET Framework from the Internet, do not post the .NET Framework Redistributable Package; instead direct users to the Microsoft Windows Update Web site."
Redistributing the .NET Framework 1.1[^]
---
b { font-weight: normal; }
|
|
|
|
|
I have a problem with Thread.Start.
In my program, serveral threads are started asyncrously, ie.
thread1.Start();<br />
thread2.Start();<br />
...<br />
threadn.Start();
All these threads are started by a thread manager and exit after they have finished their jobs.
But, just once, thread2 to threadn were all started and finished normally, while thread1 didn't continue its job. Fortunately, the thread manager could Abort thread1 by its handler.
Up to now, this happend only once, and it was not able to log the thread status when abort it.
Could anyone give some advice about why the thread will hang up even though it is started (I could confirm it by log)
Thank you
|
|
|
|
|
There are too many reasons to list since you have not provided any code, pseudo-code or even a brief discription of what your threads are doing. Are you using try-catch-finally blocks or assertions in your thread code? Are your threads modifying the same data?
|
|
|
|
|
George L. Jackson wrote: There are too many reasons to list since you have not provided any code, pseudo-code or even a brief discription of what your threads are doing. Are you using try-catch-finally blocks or assertions in your thread code? Are your threads modifying the same data?
Thank you for your reply. As it is impossible to attach too many source code, I hope a brief discription will help.
I use a thread manager of my own to create threads, keep track of the handlers of them while the threads are working and delete each handler just before each thread exits. All the threads execute in background and have a priority "normal". Threads of the same type will have the same thread name. Before the object which owns the thread manager dispose, it will also call the Dispose method of thread manager in which all thread handlers will be checked and aborted if the ThreadState is not "Stopped" (if a thread exits normally, no reference of finished thread will remain in thread manager 's list).
Of cause, if any of the threads stopped abormally, the object which owns thread manager will hang up unless it is stopped by some external "event" .
From the help of MSDN, it is said a thread will be set to Running state whenever Thread.Start() is executed and will be scheduled by OS. I have never imagined a Started thread will stop somethere.
You see, I don't use Thread directly but instead use MyThread, and all the methods have try-catch for exceptions. As for the stopped thread, if it executes , a message must be logged first which never appeared when that thread hanged.
All the threads will entered the same statemachine and lock is used with a 10 seconds timer. As no timeout occured at all, no deadlock occured.
Could you give me some hints about "the too many reasons" please ?
Thank you
|
|
|
|
|
So, what does thread execute before it stores a log message? Also, how are you logging your messages?
|
|
|
|
|
George L. Jackson wrote: So, what does thread execute before it stores a log message?
Nothing else.The first line of the thread is to store a message.
George L. Jackson wrote: Also, how are you logging your messages?
A log host service application exists in my system. All the threads in my main program (a service of XP) send log messages to a log client inside the main program(first into a quue). The log client send to log host by remoting FIFO. Both the client and the host are working after a certain thread hanged up.
Thank you
|
|
|
|
|
Does each thread access the queue directly? Are you using a synchronized queue? Also, you probably know this already, threads don't always start executing in the same order that you executed Thread.Start.
|
|
|
|
|
George L. Jackson wrote: Does each thread access the queue directly?
Yes, each thread access the thread directly but synchronized.
George L. Jackson wrote: Also, you probably know this already, threads don't always start executing in the same order that you executed Thread.Start.
As you have pointed out, I have taken this point into condsideration. But, the fact is although my program rarely hangs up, it happened when some factors occured at the same time.
|
|
|
|
|
|
I would like to continue this thread because it is not solved yet.
I realize these days that there may be some reasons in the total threads in my application. In a app., what should the total number of threads be? Here threads include all thread invoked by mechanisim such BeginInove and Thread.Start().
In my appl., the active threads number ranges from 40 to more than 60. I don't think this is proper, but threads number under my control is just no more than 5. Who should be responsible for all these threads? Many remoting process are undergone in my application.
Thank you!
|
|
|
|
|
|
Hi all!. I have detected one problem with Agilent Vee 7.52 and .NET Framework 2.0. This morning my network did not work, and if I wanted to open a .vee file with some .NET objects, it taked a long time to open. Later, when the network worked, the file could be opened correctly.
Does anybody have this problem??
Thanks and regards.
|
|
|
|
|
Hi
When i search my assembly in Addreference dialogue box i couldn't found. I always require to point my assembly by clicking Browse button on the Addreference dialogue box. Can any one tell me how i can make my assebly in Addreference Dialogue by default as like system.XML, System.Net...
NOTE : I have put my DLL in GAC also.
Thanks
Saravanakumar.K
India
|
|
|
|
|
Hi folks,
Background:
I am creating a control using VS2005 .NET Framework that reports on the progress of some background processes. There is no concept of data entry or selection here; the only user action is to scroll the list if required. The current implementation of this uses a ListBox-derived control with drawing code implemented in the DrawItem event handler. That code works (more or less) fine when the data that backs each item in the list is static. I have two items that change dynamically: a progress bar and a text field that must be able to change fairly quickly over time. The current implementation includes custom drawing code for the whole - there are no child controls.
My problem is that although I can change the value of the data field easily enough, all I can think of doing to make the ListBox aware of the change is to call Invalidate() for the whole control, and the paint events don't keep up, and the resulting effect is very jerky - tending in fact towards only updating once the progress reaches 100%
The reason for a global Invalidate is that I am not aware of anything in ListBox that enables me to discover where an individual item is on screen, so I can't paint it explicitly or do a bounded invalidate. I am wondering if ListView offers that ability, but can't see it if that's so.
So, to put the question straight: With an owner drawn list box/view, how to I tell the control that a (sub)item must be repainted now - preferably this instant - because the data backing it has changed?
Regards
Ruth
Ruth Ivimey-Cook
VS2005 / C# & VB
|
|
|
|
|
The ListBox has a public GetItemRectangle[^] function which will tell you the bounds. You could put this one into the Invalidate call.
|
|
|
|
|
I eventually solved the problem using the List View SubItem Bounds property, which returns the bounds of the specific SubItem.
I check that the bounds are contained by the parent's ClientRectangle, to avoid invalidate calls for items that are invisible, then pass the Bounds into the Invalidate call as Robert suggested. This is still slightly flickery, but not too bad.
Thanks.
Ruth Ivimey-Cook
VS2005 / C# & VB
|
|
|
|
|
Does anyone know of a way to retrieve information from a Microsoft Wireless Optical Mouse? The Intellipoint software contains a signal strength and batery level monitor, I would really like to be able to query that information from within an application I am building.
Does anyone know of an API or DLL I can use to get at the information?
Thanks in advance!
|
|
|
|
|
|
Thanks, I'll give it a try.
|
|
|
|
|
Hi,
Has anybody try SDI Video Capture & PlayBack using Matrox X.mio Card in .Net Framework ? If yes, plz help me for Capture & Playback of SDI Video.
Thanks,
Aniket
|
|
|
|
|
Hi,
when I load an image using this
Bitmap bitmap = (Bitmap)Image.FromFile(pic.Path) ,
it is not possible to delete the file afterwards, unless you exit the program. I tried to call .Dispose() on the object, but it seems like a bug in the FromFile method.
I found out a workaround
Bitmap origbmp = new Bitmap(pic.Path);<br />
Bitmap bitmap = new Bitmap(origbmp);<br />
origbmp.Dispose(); .
I keep working with the copy of the original bitmap as it's not locked anymore.
But, loading an image using Bitmap 's constructor, it's impossible to load animated GIFs as it seems that Bitmap doesn't support them.
Now, how can I use animated GIFs and other image formats AND be able to delete the file afterwards?
Thx
Stefan
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|