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

whats wrong in invoking javascript function in c#

I am trying to write a 'win app' that is connecting to a web page. you suppose this is the html page click me Next I want to load this page on a WebBrowser control and find…
Kia Boluki
  • 315
  • 3
  • 15
0
votes
1 answer

invoke of Method returning two different results (1 time Exception)

I have the following code: private static void test() { try { TestWetterAdapter adap = new TestWetterAdapter(); ClassParserUtil.executeMethod(adap.getClass().getName(), "getWeather", null); } catch(Exception…
0
votes
2 answers

Invoking a method on the UI thread, and the mysterious System.Windows.Forms.MethodInvoker.Invoke()

I'm trying to run code from worker threads by invoking it on the main UI thread; however, I don't have an instance of the main form or any controls (nor do I want one in the class where the threaded code is running). I've found things like the…
rory.ap
  • 34,009
  • 10
  • 83
  • 174
0
votes
2 answers

Invoke not working Unity

Can you tell me what's wrong in this piece of code? It does not call the Invoke function public class ReazioneBonus : MonoBehaviour { void OnTriggerEnter(Collider collider){ string nomeBonus; …
user3637284
  • 1
  • 1
  • 1
0
votes
2 answers

Invoking a Powershell script in C# results returning 0

I'm creating a Windows Service that calls a Powershell script every minute. The Powershell script returns local system information. function MachineInformation { [hashtable]$machine = @{} $computerSystem = get-wmiobject…
user2192629
0
votes
0 answers

How to invoke an Adobe Air based desktop app from an other Adobe Air based desktop app?

How to invoke an Adobe Air based desktop app from an other Adobe Air based desktop app? I found this undocumented solution, but it seems to no longer work: import adobe.utils.ProductManager; private var pm:ProductManager; private var…
Tom
  • 5,588
  • 20
  • 77
  • 129
0
votes
1 answer

VB6 MDI child form : picturebox invokes Form_Load event

I use several instances (myForm1, myForm2,etc...) of the same MDIChild form (frmChart) to display different MSCharts: frmMain: Private Sub Open() dim myForm1 as frmChart myForm1.Show dim myForm2 as frmChart …
0
votes
0 answers

MethodInfo.Invoke crashing

I have this code to protect my files from deobfuscation: Assembly asm = Assembly.Load(decFL); MethodInfo entryPoint = asm.EntryPoint; entryPoint.Invoke(null, new object[] { new string[] { "[ARGS]", "" } }); Obviously, [ARGS] is replaced by…
Adam M
  • 113
  • 3
  • 13
0
votes
4 answers

Invoke a method with parameters

I'm developing a Windows Form app with C# and .NET Framework 4.0. I'm using Task to run a long running task and I need to update UI with some log messages every time my task process a code. There is a Queue processing that code, I need to show that…
VansFannel
  • 45,055
  • 107
  • 359
  • 626
0
votes
1 answer

invoking python compiler from within java

I'm trying to run a Python program from within Java using the following statement Process p = Runtime.getRuntime().exec("python " + file); Where file is a string "c:\user\test.py" It throws me an exception Caused by: java.io.IOException:…
user2707760
  • 139
  • 2
  • 7
0
votes
1 answer

Call a function each time anothe function is invoked in Angular

I want to invoke a function, each time another function is invoked in Angular Js. In the below code, each time checkAll() or uncheckAll is called, I want the function checkTotal() also to be called. Though I have added it in normal js way, it doesnt…
esafwan
  • 17,311
  • 33
  • 107
  • 166
0
votes
1 answer

C# to VB.net Invoke error

Hey all I am trying to figure out how to get the code below to work in VB.net. I already converted it from C# to VB.net: Dim dt As New DataTable() Dim dr As DataRow dt.Columns.Add("Name") dt.Columns.Add("Number") For Each item As KeyValuePair(Of…
StealthRT
  • 10,108
  • 40
  • 183
  • 342
0
votes
1 answer

MethodInfo.Invoke with params argument

I have a static class HelperMethods that contains static methods. I need to dynamically invoke a method in an assembly where the HelperMethods is contained, but this assembly is just sometimes available. So I can't have a reference on that assembly…
moik
  • 165
  • 5
  • 14
0
votes
1 answer

How to invoke the softKeyboard for a TLF textfield in AS3?

I need to use a TLF textfield in a Flash mobile app. How to invoke the softKeyboard on mobile devices for such a TLF textfield? I tried it the way below, but it's not showing up: import flash.ui.Keyboard; import flash.events.KeyboardEvent; import…
Tom
  • 5,588
  • 20
  • 77
  • 129
0
votes
1 answer

Cross-thread operation not valid c#

my problem is How can I assign a thread to a Control. I did this article but it didn't work for me. pls help me to find out where I'm making mistake. thx private void frm_customerGrp_Load(object sender, EventArgs e) { …
Iran_Girl
  • 439
  • 2
  • 11
  • 18