Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to get active control name - - - - immediate

How to get active control name - - - - immediate

Scheduled Pinned Locked Moved Visual Basic
helptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RaveRare
    wrote on last edited by
    #1

    Dear everyone... i have problem that i have 10 listboxes onto my form. i want to display a command button but it should be displayed along with the same listbox where i am present or where i am recently clicking. so i need to store the active control name in a variable. please tell me that how i can get current control name. thanks

    E T 2 Replies Last reply
    0
    • R RaveRare

      Dear everyone... i have problem that i have 10 listboxes onto my form. i want to display a command button but it should be displayed along with the same listbox where i am present or where i am recently clicking. so i need to store the active control name in a variable. please tell me that how i can get current control name. thanks

      E Offline
      E Offline
      eyes2007
      wrote on last edited by
      #2

      sorry to say that but i just can't understand your problem, can you please describe it more. as much i think, you need a button when you select a listbox out of your 11 list boxes(am i right). make a button on runtime and make it show hide or set its visible property to true or false as per your need on given position. you have to add a handler to handle its events and don't forget to dispose the handler when you don't need it. hope this help

      help everyone

      1 Reply Last reply
      0
      • R RaveRare

        Dear everyone... i have problem that i have 10 listboxes onto my form. i want to display a command button but it should be displayed along with the same listbox where i am present or where i am recently clicking. so i need to store the active control name in a variable. please tell me that how i can get current control name. thanks

        T Offline
        T Offline
        The ANZAC
        wrote on last edited by
        #3

        Try This: Have a variable accessible to all subs. Dim LastControl as Control Then on each of the listboxes click event put this. LastControl = sender Then on the command button click: LastControl should equal the listbox last clicked.

        Please check out my articles: The ANZAC's articles

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups