|
Does it only occur if you have a picture box in a user control in a flow layout?
---
b { font-weight: normal; }
|
|
|
|
|
i've done the test and put it here
http://perso.wanadoo.fr/xtream/TestTooltipsMemoryLeak.zip
only a form with 3 picture box and a timer which change tooltips value on picture box.
Timer is disable by default, you've got to press button to enable it and watch memory used with windows task manager.
it seems that there's a memoryleak in the setTooltip method.
can someone try this apps (sources and binaries (in bin/debug) are include) and watch used memory with timer on and off to tell me if there's any trouble ?
for me, there's approximatly 1 mo per minute which is consumed and never released when timer is on.
|
|
|
|
|
Yes, I can see the memory usage go up.
I profiled it, and from what I can see there are no managed resources that causes this.
The application is going through a lot of memory, though. I displayed the garbage collection counters, and it does a garbage collection every five seconds.
---
b { font-weight: normal; }
|
|
|
|
|
I'm not shure to understand your profiling conclusion (maybe because .NET is new for me)
what does it mean "no managed resources causes this" ?
is it a problem that GC occurs each 5 sec ? is it too much or too less ?
|
|
|
|
|
Fabrice Deshayes aka Xtream wrote: I'm not shure to understand your profiling conclusion (maybe because .NET is new for me)
what does it mean "no managed resources causes this" ?
It means that the managed heap does not grow.
is it a problem that GC occurs each 5 sec ? is it too much or too less ?
Not really, but it's a bit much concidering that the program isn't really doing anything...
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
within my code,
webBrowser1.Stop() method is simply not stopping navigating. Is there any other alternative way available to STOP loading current navigating page of a WebBrowser Control ?
thanks
|
|
|
|
|
What exactly is happening?
|
|
|
|
|
Thanks for reply,
The event handler of a button is responsible for executing the following code,
weBrowser1.Stop();
But When I click the button, I see that the webBrowser is still trying to load the navigating web page and stops when it fisnihed loading, and sometimes it takes long time to load a huge page. I also verified that the event handler is really working, so there is no chance that, I clicked the Button to Stop WebBrowser but weBrowser1.Stop(); is not being executed. I am wondering, why the WebBrowser is not Simply being Stopped !!!
|
|
|
|
|
So, as an example, you have code similar to:
private void stopButton_Click(object sender, EventArgs e)
{
webBrowser1.Stop();
}
Correct?
Have you placed a breakpoint on the stop line to see if it's actually being called?
|
|
|
|
|
YEs, Right, My code is exactly like that and I placed breakpoint and also placed MessageBox.Show("I am inside the event handler") code to confirm that the event handler is really being called.
|
|
|
|
|
Guys,
I'm trying to write some classes so I can handle XML files more easily. I'm having quite some difficulty with the terminology of the Framework.
Are there some good tutorials out there that are clear? (I quickly searched CP, but couldn't find anything right away).
My goal is to be able to load/save (this one's OK) and modify/read the XML. I'm having difficulty with the terminology element/node/attribute.
I was thinking that an element and a node was the same and they have attributes, but after playing with it, that doesn't seem to be the case?
Any links/tutorials?
many thanks!
V.
Stop smoking so you can: enjoy longer the money you save.
|
|
|
|
|
The following link will show you the best XML tutorial I have ever found in the internet. This Tutorial will not will teach u XML, but also teach u how to work with XML in C#.NET.
good luck.
http://www.functionx.com/xmlnet/index.htm[^]
|
|
|
|
|
thanks a lot, the first thing showing up in google was a java snippet although the title on top of the page said C#
|
|
|
|
|
Elements and attributes are all XML nodes. A XML node is the basic building block of a XML document and besides the both named at the beginning there are some other types of XML nodes e.g. the XML declaration. To see what types are distinguished by the .NET Framework take a look at the XmlNodeType enumeration.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks, the whole thing is kinda confusing and without knowing where to look for...
|
|
|
|
|
in the name of god
hi.
how can i take handle of a object in other softwar(for example commbox in maya)?
tank you.
|
|
|
|
|
One thing that may start you in the right direction is the FindWindow[^] Win32 call.
|
|
|
|
|
i am deleting a record from the database and i get an exception message : datatype mismatch, i have the following query for deleting a reocrd from the database:
string query = "delete from registration where id = '"+
Convert.ToInt16(this.id.Text)+"'";
its point to the line 568
which contains:
com.ExcecuteNonQuery();
|
|
|
|
|
What is the type of your id column.
According to your query it must be tinyint .
do Convert.ToInt32 , if it is of type int
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
if it's an int type you shouldn't use the single quote characters
what db are you using
sql server normally likes
delete <tablename> where id = 7
access tends to like
Delete * from <tablename> where id = 7
i would guess it's a type conversion thing though, by putting the ' char in you make the data provider pass it as a string type
HTH
Russ
|
|
|
|
|
remove the single quotes and it will work.
|
|
|
|
|
G'day folks,
At the moment I am writing a little application which utilities multi threading to do some processing. Essentially, my application creates a fixed number of threads,i.e. 5. Each thread when started performs three main tasks which represents the operational states the thread is in. The operational state is essentially a particular method that is executed to perform the specific task.
In my current design I have created a global array which contains five elements to hold each thread's operational state. Each time the thread moves to a new operational state, the thread's operation state value is changed in the array. I have used the correct locking processes on the array when a thread has to update it. Here is some code which shows I how the thread is started:
int []operationalStateArray = new int[5];
void Main(string[] args)
{
Thread[] ThreadArray = new Thread[5];
MyClass myclass = new MyClass();
myclass.FetchStatusArray(ref operationalStateArray);
operationalStateArray [0] = 1; //1 implies encoding task
ThreadArray[0] = new Thread(new ThreadStart(myclass.ProcessData));
ThreadArray[0].Start();
ThreadArray[0].Join();
}
Having explained my application, my question is that: Is the approach I have taken in accessing the global array using threads is okay or are there better solutions? Is it okay to pass operationalStateArray as a reference to be manipulated by the ProcessData method in MyClass?
If anyone can give me their feedback on this I would most appreciate it.
cheers
Vee
|
|
|
|
|
Hi
I think that you can have a class (for example Operation) that has a state property ( a readonly property) that gets the state of the operation.
Operation class has a ProcessData method that will be used in ThreadStart to start a thread and within this method the operation can change its state.
Using this approach , you can have unlimited operations (not only 5 or a known number of operations) and no one can change the state of a opration except an operation itself that means you don't have to be worry about locking you objects and finally there's no need to remember the index of an external array(when an operation wants to change its state)
Good Luck
|
|
|
|
|
thanks for your feedback. I took your solution on board and managed to derive a solution based on event based asynchronous design pattern. I just had to look a bit harder in the local help of VS2005.
|
|
|
|
|
Hi,
I was wondering how i could print the content of an array string into a messagebox without using a for statement.
Thanks in advance!
|
|
|
|