Technology Software

How to Determine Control With a Current Focus VB

    • 1). Open your Visual Basic project.

    • 2). Drag a "button" from the toolbox on the left into your project. This will serve as a hook for calling the code for finding the current focus. Later, you can remove it from your project and paste the code in the appropriate place for your needs.

    • 3). Double-click the button to create a click event. This will automatically take you to the source code editor.

    • 4). Paste the following for Visual Basic 6:

      Debug.Print Screen.ActiveControl.name

      This will print the name of the control that has focus to the debugging window whenever the button you created is clicked.

      Alternatively, on later versions of Visual Basic, each individual form will have its own active control, so replace the above code with:

      Debug.Print Form1.ActiveControl.name

      Replace "Form1" with the name of the current form.

Related posts "Technology : Software"

Best Tips For Perfect Presentation

Software

Enterprise Security - Are You Ready For 2012?

Software

Magento Shopping Cart Extension Makes Shopping Manageable

Software

How to Convert VB6 to VB 2010

Software

How to Set Up Shortcut Keys in Microsoft Word

Software

Outsource CAD services – A Modern Way to Save Time and Money

Software

Best Places to Find Iron in "World of Warcraft"

Software

How to Print a PDF Drawing in SolidWorks With No Dashed Lines

Software

Open Source Web Development Cms PlatformA Wide Choice For Various Businesses

Software

Leave a Comment