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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:03:36+00:00 2026-05-18T02:03:36+00:00

I am currently translating a windows form application, written in VB6, to a webpage

  • 0

I am currently translating a windows form application, written in VB6, to a webpage written in Visual Studio 2010.

In VB6 it is easy to find out which control has focus on the form using ‘.getFocus()’. I have come to the conclusion it is not that easy, if at all possible, in vb2008.

Is this possible to do?

  • 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-18T02:03:36+00:00Added an answer on May 18, 2026 at 2:03 am

    In WinForms you can create a foreach loop like this and check if a specific control has focus:

    foreach (Control item in this.Controls)
    {
     if (item.Focused)
      //codes to handle the condition
    }  
    

    Or like spacemonkeyes said, use this.ActiveControl or VB’s version Me.ActiveControl

    However for a webpage I think you have to use JavaScript. The document object has a property named ActiveElement which as far as I know, only IE supports this property:
    document.ActiveElement
    It returns a reference to the focused control.
    To use it on the server side, you have to have a form which is submitted to the server or you could use Ajax to submit that particular control. Pretty complex codings are required.

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

Sidebar

Related Questions

I'm currently translating an API from C# to Java which has a network component.
I am currently translating my PHP application using gettext with POEdit. Since I respect
Does anyone have experience of rapidly translating an access application into a standalone windows
I'm globalizing a Windows form application. Is there a way to access common text
I'm currently translating an application from actionscript-3 to Java code and got stuck with
I'm currently translating a application and i've stumbled upon a problem. I'm using this
I'm trying to write a simple/small Windows Communication Foundation service application in Visual Basic
currently I'm translating an app from C# into ActionScript (Silverlight to Flex) and I
So, I'm working on translating my C++ app into multiple languages. What I'm currently
Currently I am aimed to create Outlook Add-in, which would create specific archive folder.

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.