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
1 answer

About Multithreading with GUIs in c#

I was reading that example that I am going to post and what I don't understand is this: They say that if I want to perform an interaction with the GUI it has to be done by the UI thread.In other words: using the .Invoke method of the Controll class.…
user2128702
  • 2,059
  • 2
  • 29
  • 74
0
votes
2 answers

In windows powershell what is the difference between $objGroup.add($objUser.Path)) and $objGroup.PSBase.Invoke('Add',$objUser.PSBase.Path)

I want to add a user to a group : I have found it is possible in two ways. First Method : $objGroup.add($objUser.Path)) where $objGroup is the directory entry of the group and $objUser is the directory entry of the user to be added. Second Method…
0
votes
3 answers

Cannot invoke method

I try to change ListView from other thread. I get an error: "Object of type System.String cannot be converted to type System.String[]". If I do not pass string[] as a parameter, the compliler will not compile the code. Do you have any idea what may…
0
votes
1 answer

Wrong file descriptor while redirecting output of a comand to file

i'm trying to code the invoke function to call in my pseudoshell, but while the simple (one command) and pipe case work, when i try to redirect, it gives me a writing error saying that the file descriptor is wrong. the argv[] contains name and param…
0
votes
1 answer

Invoke pdftohtml.exe via C#

I want to convert a pdf file into an html file, so that I can extract the values in a table. pdftohtml.exe can do this. If I call the following on a command prompt I get an html page with the content from the pdf file: pdftohtml.exe test.pdf…
Alexander
  • 420
  • 1
  • 5
  • 17
0
votes
2 answers

Function Invoke Thread

i´m a beginner in C#, a start a new Thread pollprintthread = new System.Threading.Thread(PollPrint); pollprintthread.Start(); in this Thread i call a function with a Datagridview void PollPrint() { (some code) printausfueren(); (some…
ovonel
  • 9
  • 1
0
votes
1 answer

WinForm Control BeginInvoke/Invoke Issue

I am trying to write a multithreaded WinForm in C++/CLI app using VS2012. I know that only the UI thread can update a control and I have been using delegates and the invoke methods. However, I have run into a memory access issue when using…
user1805103
  • 127
  • 2
  • 19
0
votes
1 answer

CSS3 Animation -> re-invoke failure

Problem: Once again change the selected value, the animation of the text does not start My Browser: Firefox 26.0 //Example http://jsfiddle.net/HQBVP/1/
Jan Czarny
  • 916
  • 1
  • 11
  • 29
0
votes
0 answers

Can I invoke delegates on invocation list from an extension method?

I have an interface that declares an event that will be raised when properties are changed in the inheriting class. I was reading about correct event calling ex: var eventptr = MyEvent; if(eventptr != null) MyEvent(args); When I came across :…
0
votes
1 answer

Using Control.Invoke in an optimal way

I have started a typical windows forms project (c#) with visual studio. I'm using a BackgroundWorker to fill up a TreeView control and display current progress for user. I have to use a Control.Invoke method to get access for the my TreeView…
Eugenii10
  • 5
  • 2
0
votes
1 answer

How to get the real script block if called from Invoke-Expression in PowerShell

I am trying to get the downloaded script from an iex expression directly from memory and I think there is something I am missing. $MyInvocation.MyCommand.ScriptBlock should get the current script block. In the example below it is on one side the…
uzi
  • 1
0
votes
2 answers

How to invoke from UI thread (C# .NET 2)

Usually we invoke on UI thread that way : myControl.Invoke((MethodInvoker)delegate() { Foo(); }); Are they any way to do it without any control instance ? I mean something like this : System.Windows.Forms.Thread.Invoke(...); Solution Solution given…
56ka
  • 1,463
  • 1
  • 21
  • 37
0
votes
1 answer

How to correctly invoke a method when I know the class?

I am implementing an IdChecker program who check the uniqueness of "id's" for classes and methods of a project. The IdChecker run only at compilation of my project...before I push a release. For the classes it is easy to get the id's because I just…
mofobo
  • 7
  • 3
0
votes
0 answers

VB.NET Form Freezing

Public Sub New() ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. Dim t As New Threading.Thread(AddressOf Start) t.Start() End Sub Private…
Al.Pertro
  • 175
  • 1
  • 6
0
votes
2 answers

Equivalent of "this.SynchronizingObject.Invoke()" in java

I have a c# code, which must be ported to java. And now I encounter this instruction mentioned in my topic. this.SynchronizingObject.Invoke((MethodInvoker)delegate() { // do my stuff }, null); Now…
icbytes
  • 1,831
  • 1
  • 17
  • 27
1 2 3
99
100