Questions tagged [invoke]

Executes the specified delegate on the thread that owns the control's underlying window handle.

The Invoke method searches up the control's parent chain until it finds a control or form that has a window handle if the current control's underlying window handle does not exist yet. If no appropriate handle can be found, the Invoke method will throw an exception.

1794 questions
0
votes
0 answers

How to print .bat script error into summary section when running a TFS build definition

I'm running a .bat file via the InvokeProcess activity in a build process template. The file is well executed along within a queued build but the error log (to the console) of my .bat file is not visible in the Summary section of the executed build…
Nam G VU
  • 33,193
  • 69
  • 233
  • 372
0
votes
1 answer

Trying to perform a dynamic Action on multiple controls at once, it is giving a cross-thread exception

I've did a class named "ControlIterator" that has methods to iterate multiple controls to enable or disable them, check or uncheck them, and now I would like to add a method to perform an Action on the specified controls. Keep in mind that this…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
0
votes
2 answers

How to invoke a base class, together with inheriting and overriding?

Ok so this is multiple questions rolled into one. I honestly need a tutor or someone to talk to in person to clear up some of these concepts, but I'm taking this c# class online and the professor refuses to communicate with me so my next step is to…
Evan Lemmons
  • 807
  • 3
  • 11
  • 27
0
votes
1 answer

How do I properly wait for a task to complete an invocation using multiple threads?

The code below is a simplified example of a problem I am having. What happens upon the form loading - the For Loop will create a new task per iteration, then go as far as entering the 'if (pic.InvokeRequired)' section, but will return back to the…
0
votes
3 answers

Thread Safe Method Invoke doesnt work

Sup Guys, I Have a Function on my frmMain Class wich will update my control to something else after an invoke. When i type "?Label1.Text" on the Immediate Window, the text property IS updated, but when i go check the Form, nothing happened. The code…
Alex
  • 3
  • 2
0
votes
1 answer

C# Run a method inside serialport_datareceived Event

I want to run a method inside serialport_DataReceived event. public void Draw(byte[] data); private void myPort_DataReceived(object sender, SerialDataReceivedEventArgs e) { this.Invoke(new EventHandler(DrawingAudioData(data))); } This is…
Blast
  • 955
  • 1
  • 17
  • 40
0
votes
1 answer

How can I invoke function jquery with ashx handler?

I'd like to know how can I invoke a function in an aspx handler(.ashx). This is what I've tried: public void ProcessRequest(HttpContext context) ... context.Response.ClearContent(); context.Response.ContentType =…
Severiano
  • 1,083
  • 3
  • 25
  • 54
0
votes
1 answer

Python debugging by invoking the keyboardinput in a script

ys it possible to invoke the keyboard in a python script? E.g. in MATLAB there is way to write % A lot of code "A" ... keyboard % A lot of code "B" ... in a script, so if you execute the script, it will halt at "keyboard" and you can go on in your…
Tik0
  • 2,499
  • 4
  • 35
  • 50
0
votes
1 answer

Does Vala support self-invoking?

Is there any way that Vala supports Self Invoking? Either with a class, or with a method? Javascript supports self invoking like below. Which is what im looking for. (function(){ // some code… })(); I'm attempting to load a class into a…
Chris Timberlake
  • 490
  • 4
  • 16
0
votes
2 answers

How to call a method with parameters?

I'm trying to get the return value savedName from calling the method. I need to use the value from the string saved name in another method if (n == 0){ String fullName = readFromFile(); //wont let me do this …
JavaScrub
  • 7
  • 2
  • 5
0
votes
1 answer

Method.Invoke() behaving strangely C# .NET BackgroundWorker

I have the following code with some detail taken out: private void bkgdProcessData_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) { bkgdProcessData.ReportProgress(0); bool rdPickChecked = false; bool rdAutoChecked =…
gnarlybracket
  • 1,691
  • 4
  • 18
  • 37
0
votes
3 answers

Events and Multithreaded code in .NET

Project is C#. So I have a bunch of multithreaded code that is designed to be run as a library. It's in a seperate project from the UI. My library has a central object that needs to be created before anything that would fire off events is…
Joel Barsotti
  • 3,031
  • 7
  • 35
  • 59
0
votes
2 answers

system.reflection.targetparametercountexception parameter count mismatch Parameter count mismatch

I am trying to Update UI using different threads and use the below process to do so.But getting the above error during invoke. Kindly advice is this not allowed. delegate void SetLabelCallback(string text,string Qmgr); private void…
user2772983
  • 43
  • 2
  • 7
0
votes
1 answer

How do you add Invoke methods to a custom control?

I have a custom control progressbar, that I need to update through another thread.. There doesn't seem to be an Invoke, BeginInvoke, InvokeRequired etc available to a custom control, does anyone have any ideas on how to implement this within the…
JGU
  • 879
  • 12
  • 14
0
votes
1 answer

InvokeAsync order reliability

I have a question about invokeAsync and wether the cal order can be taken as reliable ornot. Example: //Get Dispatcher of UI Thread private Dispatcher _dsp = Dispatcher.CurrentDispatcher; //Method called from non-UI Thread private void a() { …
537mfb
  • 1,374
  • 1
  • 16
  • 32
1 2 3
99
100