|
Hah you're talking to an ex VB dev here, type safety indeed.....
Everythings a variant, that's theway to go.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi All,
I am currently developing a program in VS 2005 C#.
In the program, it shows a live video on a sequence of IO (cylinders, sensors) actions.
The live video is being displaying with a PaintDelegate thread and a callback that I copied from the sample program of the frame grabber manufacturer.
And the sequence of IO is being performed with a backGroundWorker, in which the sequence repeats for 5 times with a for loop.
After leaving the program to run for more than 24 hours, it is noticed that the live video will freeze. After checking with the frame grabber manufacturer, I was told that their sample program should have no problem to run a non-stop live video for 24/7.
So now, I am kind of suspecting that it is the problem with the backGroundWorker, with its resources keep accumulating until it occupies the whole memory of the CPU.
In this case, how should I solve this problem? Should I do a backgroundWorker.Dispose();
every time?
The tool tip on backgroundWorker.Dispose(); says that it releases all resources used by the System.ComponentModel.Component.
What does it means by all resources? Are the boolean type flags considered as the resources too?
If the boolean type flags are released, what state will they become after the .Dispose()?
|
|
|
|
|
There could be a lot happening. I would just try to dispose of everything that you can afford to (dispose anything you are done with for a bit or period). That should rule out memory leak type issues.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Dear All,
I am using Data Grid control and want to edit record in data grid by selecting one record and clicking on edit button all data should appear in text boxes like data is
name
class
address
all information should come into different text boxes when select one record in data grid and click on edit button.
Thanks in advance.
Sajjad ali
|
|
|
|
|
ASP.NET has a very good example of this on their site. The principle is close for a windows app if you are doing that.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
yes i am using window application
then what you will suggest .
Thanx
|
|
|
|
|
Then you are using a DataGridView - get it right and it is easier to fix.
Bind your DGV to the table and bind the text property of the textboxes to the relevant fields of the table.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
yes i am using DataGridView when i code like
Text.Text1 = dgvStudinfo.item.add(0,0).value
to add value to text box this code i done in vb.net but c # not supporting it.
this is the confusion.
|
|
|
|
|
I assume you have bound the dgv to a datatable. So do this for your textbox
Text1.DataBindings.Add(new Binding("Text", oTable, "ColumnName"));
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Dear i am sorry to say i am not understanding what you suggest and please send me code with description.
Thanks
|
|
|
|
|
Sajjad Leo wrote: please send me code with description
Mycroft has already given you the code.
If you do not understand it, then google or use MSDN to look up the parts you don't understand.
If you just use code 'given' to you by other people, you will never make a programmer. Do a little work!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Yes Dear You are right i can't be good programmer if i ask form others line by line so please tell me
Who is good programmer?
What programmer should have?
Thanks
|
|
|
|
|
I do not claim to be a good programmer, but:
For me, there are parts of C# that I understand reasonably well. Those parts are the ones that I have had to research for myself. By going through the process of research (looking on Google or MSDN), reading lots of the entries found, each one brings a little more understanding. Sometimes, not often, but sometimes, you actually find a complete solution to the problem you are researching.
In the case of your problem, I happen to know, because I looked it up, that there is a complete example of what you want to do, out there.
Believe me, you will remember far more when you do it yourself than you will by relying on others.
Don't be a cut and paste merchant, be a coder. Write code, try things out. RTFM.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Well said dear but i am still initial level and not good with .net platform
I am trying and i hope you all expert will guide me little bit.
Thanks
|
|
|
|
|
Sajjad Leo wrote: I am trying and i hope you all expert will guide me little bit
You have already been guided by two 'experts' Expert Coming and Mycroft Holmes. The clues they gave you should be enough for you to at least write some code. The ASP.NET suggestion from Expert Coming only requires some slight modification to provide a solution. The line of code given to you by Mycroft will work straight out of the box. You have to join the dots.
Try with a clue from a definite non-expert, research DataGridViewRow .
Last bit of help, from me at least.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Back to solutions. ..
What you can do is only binding. .
Now suppose you have a datatable containing the data of any particular table.
Now you have a datagrid named dgv
and textboxes named as txtaddress, txtname,txtphone, etc. .
Now you can work as this . .
//Take a Binding Source..
BindingSource src = new BindingSource();
//Giving datasource of binding source as datatable named dt
src.DataSource = dt;
//Binding the datagridview.
dgv.DataSource = src;
//Also binding the same bindingsource to those text boxes
txtaddress.Bindings.Add("Text",src,"Address"); //Here "Address" is the column name of address.
txtname.Bindings.Add("Text",src,"Name");
..
..
..Thats it..
All the other work will be carried out automatically.. .
Just try out. .
|
|
|
|
|
I think you might have suffered from mouse-slip.
It was not me that was asking the question.
The OP sajjad, might not see your answer.
Might I suggest that you hit 'reply' on one of sajjads messages and copy your answer to him.
Cheers.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Really henry. .
I was having a mind that I have replied to sajjad. .
Anyway thanx for notifying me. .
|
|
|
|
|
Back to solutions. ..
What you can do is only binding. .
Now suppose you have a datatable containing the data of any particular table.
Now you have a datagrid named dgv
and textboxes named as txtaddress, txtname,txtphone, etc. .
Now you can work as this . .
//Take a Binding Source..
BindingSource src = new BindingSource();
//Giving datasource of binding source as datatable named dt
src.DataSource = dt;
//Binding the datagridview.
dgv.DataSource = src;
//Also binding the same bindingsource to those text boxes
txtaddress.Bindings.Add("Text",src,"Address"); //Here "Address" is the column name of address.
txtname.Bindings.Add("Text",src,"Name");
..
..
..Thats it..
All the other work will be carried out automatically.. .
Just try out. .
|
|
|
|
|
Hi All,
Can any one send the code for
by giving Week number,week day and month name
i want date
example: week no 4,Monday,March,present year
then it should get the date as "22 march 09"
Thanks&Regards
Shavil
|
|
|
|
|
Send you the code - not what we do here.
However if you chuck your date into a DateTime type and explore the DateTime object I'm sure you can get the answer you are after.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
shavil wrote: Can any one send the code
I am afraid nobody will ...
I Love KongFu~
|
|
|
|
|
[sarcasm] Sure, we will. But please post your email-address so people are able to send you the codez directly. That way you don't need to come to the forum looking for an answer. Makes things more comfortable for you. Maybe you also should put the words "URGENTZ NEEDZ CODEZ, I WANT SOLUTION!" into your post, to make clear how important the matter is.[/sarcasm]
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Hi ,
I am trying to generate an excel report from ASP.Net using C#.
My development server as ExcelObject Library 5.0. Where as my server as 11.0 Installed. I get the below error when trying run it in server
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
We don't have admin rights in the server which leaves us with no option in 5.0 library.
Is there a way to solve this issue?
|
|
|
|
|
This is the primary reason that Office is almost NEVER used for report processing. You need the same version and sometimes service pack on ALL MACHINES, a bloody support nightmare.
I STRONGLY recommend moving to a dedicated report product eg SSRS.
Never underestimate the power of human stupidity
RAH
|
|
|
|