|
Yes, I read more about threads and found that the issue here is working on the same thread in UI and the process. So I have to do the process in background.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
And why Thread.Sleep()?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Actually I want to make a delay in between each stream.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hi all
I have 20 check boxes in my page and i need to fire the checkbox checked event for all check boxes.
Instead of writing the checked event for each and every checkbox is there any way to fire the checked event with only one function.i need to get check box id if it is checked.
I'm doing in C#.Net web application
Thank you.
siri
|
|
|
|
|
Write something like this in the constructor or the form's Load event or whatever.
checkBox1.CheckedChanged += checkBox_CheckedChanged
checkBox2.CheckedChanged += checkBox_CheckedChanged
checkBox3.CheckedChanged += checkBox_CheckedChanged
Or you can simply set the CheckedChanged handler function from the Properties window (the Events section) for the checkboxes.
And to know which fired the event, it's the sender argument of the handler.
CheckBox Sender = (CheckBox)sender;
Eslam Afifi
|
|
|
|
|
Hello all,
I just found out that I can't bind a DataGridView to an array of DataRows. The reason for wanting an array of DataRows is because I'm performing so very complex filtering that can't be done with the DataTable.DefaultView object. My question is, why does the datagridview accept a dataTable as a dataSource but won't accept an array of dataRows, even though they contain a reference to the dataTable. Is there a way I can create a custom class that implements IListSource and contains datarows from the dataTable? As you well know, an exception is thrown is you try to add a existing row to another dataTable. I want a memory reference instead of the actual values (DataRow.ItemArray) to save memory overhead.
Thanks,
Richard
I've used up all my sick days, so today I'm calling in dead.
|
|
|
|
|
Richard Blythe wrote: very complex filtering
Like what? and how are you filtering it?
The reason i ask is becuase the DataView class is built for filtering from a DataSet, and you can bind it to the DataGridView.
If you really cant use the DataView, why not build your own dataSet up with your DataRow[]? something like....
DataTable table = new DataTable;
foreach(DataRow currentRow in myDataRowArray)
{
table.Add(currentRow);
}
DataSet.Add(table);
This was done off the top of my head, it might not be 100% correct but the idea of what you need to do is there
Hope this helps
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
How do i turn an array or an arraylist into a text file?
|
|
|
|
|
Iterate the collection and write each element to a StreamWriter.
|
|
|
|
|
How do I make the tooltip appear on a datagridviewcell (textBox column) even if the user doesn't move their mouse over it and while it is editing.
I am trying to implement a auto-complete feature that will show a tooltip with a match and ask the user to press a key if it is the correct match. It is identical to Visual Studio when one presses form1.FormClosed += and the tooltip box appears with an auto-complete of the event.
Thanks in advance.
|
|
|
|
|
I want to print using RDLC on a preprinted forms/invoices and i have some questions..
1. How can I print on a specefic locagtion on the preprinted form/invoice?
2. If I am using the dot matrix printer, how can move the paper up and down while printing?
|
|
|
|
|
|
hello....
anybody there?
|
|
|
|
|
Hi,
Actually, you don't need to think about locations and positions, just design your reports, you can use the preprinted form as a background (temporary) for alignments, and the printer will take care about the rest. Hope this will help.
best regards,
|
|
|
|
|
hi,
i need a link or ebook on static classes. i not good at classes programing i often repeat code, and i usually do the all the coding and classes i do it in the end.
i want more of static classes to use with the "set" and "get" type of code.
thanks
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
How about MSDN[^]?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
hi,
I have some applications that connects to databases, i trigger edit/delete/insert and reports from the application.
everytime i trigger some action i open and after close the connection.
my question is; do i win something by opening connection in first time (i trigger whatever) and after that ask if connection is open and if not open it (close connection when formclosing event for exemple).
does it works better, faster, whatever?
(connection_string works and everthing else)
thanks
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
nelsonpaixao wrote: does it works better, faster, whatever?
Not really. Best practice is to open the database only when you need to connect to it when working with the data, then when done working with the data, close the database connection.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
|
You can use P/Invoke to call unmanaged functions.
|
|
|
|
|
Thanks.
Just read your article on minimizing applications to tray with P/Invoke and user32.dll's unmanaged functions,
Do you know anywhere i could find an example of the unmanaged function i would use to get a list of the icons and their context menus?
|
|
|
|
|
What do you mean by list of the icons? Which icons do you mean?
|
|
|
|
|
I would like to be able to display a list of applications in the shell tray.
Just like the application in the C++ Article above,
I was wondering if C# had a method to enumerate the tray icons (Bottom left of windows taskbar) and the context menus for them.
|
|
|
|
|
You can use the methods and functions described in that article. You can use P/Invoke[^] to call functions from native dlls used in that article
|
|
|
|
|
Ok thanks ill see what i can come up with
|
|
|
|