How to get active control name - - - - immediate
-
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
-
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
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
-
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
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