Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 730143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:52:41+00:00 2026-05-14T06:52:41+00:00

if (InvokeRequired) { BeginInvoke(new MethodInvoker(delegate() { textBox1.Text = args.Fax.Port.ToString(); textBox2.Text = args.Fax.FaxStatus.ToString(); })); }

  • 0
if (InvokeRequired)
{
  BeginInvoke(new MethodInvoker(delegate()
  {
    textBox1.Text = args.Fax.Port.ToString();
    textBox2.Text = args.Fax.FaxStatus.ToString();
  }));
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:52:42+00:00Added an answer on May 14, 2026 at 6:52 am

    From MSDN

    Delegate Sub MyDelegate(myControl As Label, myArg2 As String)
    
    Private Sub Button_Click(sender As Object, e As EventArgs)
       Dim myArray(1) As Object
    
       myArray(0) = New Label()
       myArray(1) = "Enter a Value"
       myTextBox.BeginInvoke(New MyDelegate(AddressOf DelegateMethod), myArray)
    End Sub 
    
    Public Sub DelegateMethod(myControl As Label, myCaption As String)
       myControl.Location = New Point(16, 16)
       myControl.Size = New Size(80, 25)
       myControl.Text = myCaption
       Me.Controls.Add(myControl)
    End Sub 
    

    So

    if (InvokeRequired)
    {
      BeginInvoke(new MethodInvoker(delegate()
      {
        textBox1.Text = args.Fax.Port.ToString();
        textBox2.Text = args.Fax.FaxStatus.ToString();
      }));
    }
    
    Delegate Sub MyDelegate(faxPort As String, faxStatus As String)
    
    If InvokeRequired Then
        Dim aArray(1) as Object
        aArray(0) = args.Fax.Port.ToString()
        aArray(1) = args.Fax.FaxStatus.ToString();
        BeginInvoke(New MyDelegate(AddressOf MySub), aArray)
    End If
    
    Sub MySub( faxPort as String, faxStatus as String)
        textBox1.Text = faxPort
        textBox2.Text = faxStatus
    End Sub
    

    I think

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

private void manager_OnWebSiteVisited(object source, WebSiteVisitedEventArgs args) { if (InvokeRequired) txtStatus.BeginInvoke(new WebSiteVisitedCallback(WebSiteVisited), new object[] {
Overview Are there explanations for Control.BeginInvoke() to not execute a delegate that it is
What is the difference between InvokeRequired and somecontrol.InvokeRequired ? like this, delegate void valueDelegate(string
For what reasons would this.InvokeRequired equal False within InitUIState() , as this new thread
I have a 'generic' boiler plate static method for checking for InvokeRequired and invoking
I am using Func<> or Action<>.BeginInvoke to run methods asynchronously using the ThreadPool. Is
I seem to remember seeing some neat way of calling InvokeRequired and Invoke to
I don't get it. If I want to change the text on a button
Why can't you pass an anonymous method as a parameter to the BeginInvoke method?
Explanation: Structure: Windows form - three components: Text box, Text box Response and button.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.