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 8862821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:49:14+00:00 2026-06-14T15:49:14+00:00

I have vb.net form that opens another vb.net exe to test. I am trying

  • 0

I have vb.net form that opens another vb.net exe to test. I am trying to test if a specific textbox has focus when the exe is loaded.

My tester form loads the exe using Assembly.UnsafeLoadFrom(_path)
It then runs the FormtoTest on a new thread

I use the System.Type.GetProperty() and GetFields() functions to get all of the FormtoTest’s input fields and their properties.

I then find this textbox in the list of input fields,

But when I call the System.Type.GetProperty(“Focused”), I get an error:
“Cross-thread operation not valid: Control ‘txtID’ accessed from a thread other than the thread it was created on.”

Thanks for your help!

  • 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-06-14T15:49:15+00:00Added an answer on June 14, 2026 at 3:49 pm

    It sounds like you will need to use delegates

    references

    http://msdn.microsoft.com/en-us/library/ms951089.aspx

    This is in C# but explains the basic concepts as well.
    http://www.codeproject.com/Articles/2083/The-key-to-multi-threaded-Windows-Forms-UI-interac

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

Sidebar

Related Questions

I have an ASP.NET Web Form (C#) that users fill out, it has a
I have an asp.net form that contains some html, 2 controls a calendar from
I have an ASP.NET MVC form that when submitted can return either an ActionResult
I have a pretty simple ASP.NET Web Form that looks a bit like the
I have an ASP.NET form (C#) but which I click this button that should
I have an asp.net web form (c#, .NET framework 3.5) that returns to itself
JI have written a .NET C# Windows Form app in Visual Studio 2008 that
I have application in VB.net that have two different form (Form1 and Form2). Now
i have an asp.net form and an asp:textbox. i have a problem when the
I have a form MainForm with several properties/methods that are accessed from another thread.

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.