|
|
Personally I would stick with downloading one file at a time. You still have to transfer same about of data so it is not like it will be any quicker to download simultaneously
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
This "problem" is basically the same as your earlier one, so I suggest you read this thread[^] again!
|
|
|
|
|
I agree it is similar, but not exactly the same.
For pinging I used for loop with PingIP.DoAsyncPing(IPadress[i]); and it works asynchronous.
I guess I could create backgroundworkers dynamically (for each ftp download) and run them asynchronous.
As I am new to multithreading, I still having trouble differentiating between backgroundworker, thread, thread pool, tasks ...
Basicly I want to create multithread application with different threads (tasks):
1) scan network for devices (if connected)
2) download files using ftp
3) read from files
4) processing file content
5) some actions, based upon proccessed data
|
|
|
|
|
peropata wrote: I used for loop with PingIP.DoAsyncPing(IPadress[i]);
that wasn't my recommendation.
peropata wrote: I could create backgroundworkers dynamically (for each ftp download)
That would be very expensive. Read the other thread again!
peropata wrote: I still having trouble differentiating between backgroundworker, thread, thread pool
They basically are all the same. ThreadPool lends you pre-existing threads (that is cheaper) with very little control. BackgroundWorker is a Thread with some goodies added to it, would probably be OK for your needs.
Warning: BGW needs several properties set true before it starts behaving well!
|
|
|
|
|
So if I understand correctly, it is better to use one background worker (or split between just a few workers).
|
|
|
|
|
hi!!
I have a datagridview in a form. i want to send all the data from the first datagridview to another datagridview, which is present on another form.
Best Regards,
|
|
|
|
|
Which part are you have trouble with? Have you worked out how to communicate with another form yet? (e.g. call a function in another form?)
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
no, actually i couldn't understand how to get data one by one and copy to second DGV.
|
|
|
|
|
Well assuming you have the same columns set up in both tables then you can iterate through the Rows property and add each one. Something like...
foreach(DataGridViewRow row in dgv1.Rows)
{
dgv2.Rows.Add(row);
}
You would obviously need to pass the first DGV's Rows collection to the second form to be processed
Life goes very fast. Tomorrow, today is already yesterday.
modified on Thursday, November 11, 2010 8:58 AM
|
|
|
|
|
when i insert your code the following errors occured.
No row can be added to a DataGridView control that does not have columns. Columns must be added first .
and when i insert column by following code:
foreach (DataGridViewColumn c1 in dataGridView1.Columns)
{
DataGridViewColumn c2 = (DataGridViewColumn)c1.Clone();
dataGridView2.Columns.Add(c2);
}
this error occured:
Row provided already belongs to a DataGridView control.
|
|
|
|
|
OK my mistake, something like this should work...
foreach (DataGridViewRow row in dgv1.Rows)
{
object[] cells = new object[row.Cells.Count];
row.Cells.CopyTo(cells, 0);
dgv2.Rows.Add(cells);
}
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
What is the collection that is used to populate the DGV, datatable, List<>, array[] or is the DGV manually created with no underlying collection.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
In my application I need to check and disable a device if it is a USB keyboard or USB mouse. How can i know the type of the device plugged into a system?
Please advice.
Regards,
Joe.
|
|
|
|
|
Maybe you could look into WMI[^] - use google to search for your specific needs
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
|
Guys,
I am done with my .exe, now i want to setup the exe through a installer packager and update the same in Add or remove programs in Control Panel, can some body let me know the process.. I googled a lot , no use.. Please help me out...Thank u
|
|
|
|
|
If your willing to pay then MSI Factory[^] is a good tool
Otherwise you could look into WIX[^] (lots of effort) or what is available in Visual Studio[^]
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Make a Setup and Deployment to make installer package.. In that way you can have in control panel too.
|
|
|
|
|
Thanks dude... its worked ... One more thing how to create a desktop shortcut for inatalled location using this deployment...
|
|
|
|
|
Don't get too used to the Setup and Deployment project. It won't be there in the next Visual Studio.
I highly recommend you start using InstallShield Express or some other packaging tool, InnoSetup, Wise for Windows Installer, WIX, ..., in its place.
|
|
|
|
|
Hello i am using visual studio 2010. I am currently working on a project and i am stuck at the part where i must effectively remove the background of an image. I am working on images like flowers.
i am now currently using filters to filter out the background. however different image has different color values and i have no idea how to remove background for different images.
i use the follow codings:
<br />
ColorFiltering filter = new ColorFiltering();<br />
<br />
filter.Red = new IntRange(30, 100);<br />
filter.Green = new IntRange(0, 255);<br />
filter.Blue = new IntRange(0, 255);<br />
<br />
filter.ApplyInPlace(cropImage);
and every time i want to filter the image i have to change the filter values myself manually is there any way i can do it without doing it manually?
|
|
|
|
|
WOAH!!! Yesterday you couldn't do the basic task of getting MIN and MAX values for an int array and now your on to image processing!!! You must have read alot of books last night
I don't know about this ColorFiltering thing you got going on but I guess you need to calculate BG colour and use that.
Is the BG colour always going to be a solid one colour? If so you could make the assumption that the very first pixel is part of the BG, Get its colour and use that as the colour to filter.
I guess you are also assuming that the BG colour will not also be used in the parts of the image you want to keep?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
oh i manage to find out how to do the min and max of course i move on. and by the way i am very new to c# programming and my project requires me to do that so i have no choice pls understand if i post qns that might seems easy to you but it might be hard for me. I felt helpless so i turn to forum.
the background consist of many different color not one solid color.
All i know was keeping the color i want using filter(code) as shown above however i have to manually set the color. is there anyway i can do it so that it can automatic detect the colors i want to keep?
|
|
|
|
|
Its not easy for me either, I certainly don't know how to do what you need. But you just seem to be very deep in with so little knowledge.
There is a saying on my planet... "Don't jump in the deep end if you cant swim (or if your wearing iron boots without a blue tunic on)"
One tip - Code cannot guess what you what (not with 100% guarantee at least) basically you need to tell it one way or another what color(s) you want to keep.
How do you determine which colour(s) you want to keep?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|