Linked Questions

0 votes
0 answers
63 views

I'm getting tired of trying to figure out when and where an invoke is required. Rewriting this code over and over inline is tedious. I have created the method below to help solve this issue: public ...
Lee Toffolo's user avatar
0 votes
0 answers
23 views

I am working to derive an ASCOM driver for an DIY astronomical dome from an example of a focuser. Here the original for a focuser device: ASCOM.EQFocuser.Focuser focuser;         public MainWindow(...
autoguider's user avatar
133 votes
9 answers
72k views

Take the method System.Windows.Forms.Control.Invoke(Delegate method) Why does this give a compile time error: string str = "woop"; Invoke(() => this.Text = str); // Error: Cannot convert lambda ...
xyz's user avatar
  • 28k
50 votes
8 answers
20k views

I know that when manipulating UI controls from any non-UI thread, you must marshal your calls to the UI thread to avoid issues. The general consensus is that you should use test InvokeRequired, and if ...
Erik Forbes's user avatar
38 votes
5 answers
53k views

I know that this question has been asked before, but I'm looking for a way to: streamline the creation of safe cross-threaded code. reuse this code in any situation (no Windows Forms references). Here'...
CLaRGe's user avatar
  • 1,821
40 votes
6 answers
9k views

I've seen the common setup for cross threading access to a GUI control, such as discussed here: Shortest way to write a thread-safe access method to a windows forms control All the web hits I found ...
MattH's user avatar
  • 4,237
27 votes
4 answers
17k views

With the logging system Serilog is it possible to display the log in a text box, or a list view or some other GUI control; what is the mechanism to get it there?
TheColonel26's user avatar
  • 2,728
11 votes
2 answers
81k views

I'm new with C# and I'm trying to make a simple client server chat application. I have RichTextBox on my client windows form and I am trying to update that control from server which is in another ...
user avatar
4 votes
12 answers
20k views

I am creating an Windows Application. I have two buttons. I have written the following code snippet. frmRb obj = new frmrb(); private void btnPd_Click(object sender, EventArgs e) { ...
sheetal's user avatar
  • 387
8 votes
4 answers
28k views

I am using the following code to invoke the controls that are on the main UI thread in my application. The progress bar that I have in my Status Strip does not have a InvokeRequired, I need to somehow ...
Sev's user avatar
  • 781
6 votes
3 answers
15k views

I want to create multiple UI threads in my application. I have simulated the scenario as below. I am creating a new window / form on a button click in a background thread namespace ...
Angshuman Agarwal's user avatar
4 votes
4 answers
15k views

Console.WriteLine("Network adapter: {0}", adapters[i].Name); Console.WriteLine(" Status: {0}", adapters[i].OperationalStatus.ToString()); Console....
Sheng Xengg's user avatar
4 votes
5 answers
15k views

I have to close a Form from a thread and I am using the Invoke method of the Form for calling the Close() method. The problem is that when closing, the form is disposed and I get an ...
Alfort's user avatar
  • 91
2 votes
2 answers
7k views

I'm not sure if this is good programming etiquette, anyway I have a normal method in which I update certain bits of data and UI elements such as textblocks etc. Anyway, I want to create a thread that ...
monkeyguy's user avatar
3 votes
5 answers
6k views

I have a program that has Classes GUI Upload and a buffer between the 2 classes - ie used to communicate between the 2 classes . The Upload class uses Process to run an command line FTP app. I ...
nf313743's user avatar
  • 4,267

15 30 50 per page
1
2 3 4 5 6