|
-
Sep 15th, 2000, 11:35 AM
#1
Thread Starter
Member
1 . how can I find a visualbasic control programatically at runtime
I mean :
I will click a command button at runtime and
I will show item's name that focused before command button without describing any special property of that item.
I doesn't want to write
msgbox item.name (item.name is static.)
instead I want to write code that firstly find which item focused before command button and then show its name.
(item.name is dinamic.)
-
Sep 15th, 2000, 01:47 PM
#2
Fanatic Member
hmm
Let me make sure I understand first
You want to click on a command button... and you want to know what item had focus before you clicked that button
correct?
let me know
Thanks
-
Sep 15th, 2000, 02:23 PM
#3
You mean something like this?
Code:
Dim LastControl As String
Private Sub Command1_Click()
MsgBox LastControl
End Sub
Private Sub Command2_LostFocus()
'Store Command2 in LastControl
LastControl = Command2.Name
End Sub
Private Sub Picture1_LostFocus()
'Store Picture1 in LastControl
LastControl = Picture1.Name
End Sub
-
Sep 16th, 2000, 06:45 AM
#4
Thread Starter
Member
YES . you understand
yes , you understand correctly LAFOR .
(sorry. my explanation is very confusing)
-
Sep 16th, 2000, 06:50 AM
#5
Thread Starter
Member
thank you fo your answer megatron
can't I use control's collection to find last focused item.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|