Linked Questions
10 questions linked to/from Invoke in Windows Forms
2
votes
2
answers
3k
views
Try catch with a delegate
I am entering someone else's codebase in c# as a previously c++ coder. All over his code I find snippets that look like this:
MethodInvoker invoker = new MethodInvoker
(delegate()
{
...
0
votes
1
answer
3k
views
Accessing Object Fields from another Thread c#
I need to access the TimerData.textSet field to change the text displayed from a another thread that controls the timing. But a InvalidOperationException is thrown. Is there a solution to this problem....
-1
votes
2
answers
1k
views
Windows MessageBox Display Issue with Cross Thread
I am trying to display error message notification using MessageBox.Show() method. But I am getting Cross thread operation issue. I used the below code. How can I resolve the cross thread issue? I ...
0
votes
0
answers
262
views
How to modify UI elements from async c# [duplicate]
I need to add in a form.listwiew some rows but i need to add them dinamyically while my async function is processing...
I have read that is not possible to do this from an async method. Anyway i have ...
2
votes
0
answers
202
views
How to make an asynchronous call to a synchronous method in C# [closed]
I am writing a method (in C#) that will be linked to a button in a GUI.
One operation in this method is very time intensive (takes several minutes). It's a call to a normal synchronous void function ...
-2
votes
2
answers
110
views
Can I Avoid "Not Responding" messages without a background process
I have a specialized application that is compute intensive with adjustable and occasional visual feedback into a component on the main form. My main form also has a slider that controls how the user ...
-3
votes
3
answers
177
views
When c# catch and handle event? [closed]
I have this code :
serialPort.PinChanged +=Func5;
Func1();
Func2();
//here event throw
Func3();
Func4();
Console.ReadKey();
When I enter to Func5? Only when my thread will not have what to do?(after ...
0
votes
2
answers
163
views
C# - Run Task in foreach listviewitem with xNet Request
My Code :
foreach (ListViewItem item in list.Items)
{
string url, path, host;
url = item.SubItems[0].Text; // example "www.google.com/"
path = item....
0
votes
1
answer
89
views
ListView No Item Added
private void ItemGet()
{
for (int i = 0; i < this.listview2.VirtualListSize; i++)
{
var address = this.listview2.Items[i].Text;
int item_aid = this.lib.ReadInt32((IntPtr)(...
0
votes
1
answer
85
views
InvalidOperationException in thread based drawing
I'm new to the coding game so I'm not too sure how to remedy this. My code pulls information from a thread that harvests data from a 9DOF sensor which comes out as three Euler angles. The data is then ...