|
-
Jul 28th, 2000, 01:34 PM
#1
Thread Starter
New Member
Here's the scoop:
I have six controls on my form - three text boxes and
three label boxes. I also have a menu defined and
call it as a popup menu when the user _LEFT clicks_
on the textboxes and _RIGHT clicks_ on the label
boxes. It's an early lab for a client/server class.
The problem is - when a user selects a choice on the
popup menu, I need to know what control he/she just
clicked on to bring up the popup menu in the first place.
This way I will only affect the textboxes or the
labels but not both. Since labels cannot get
focus, the textboxes are always the "active control"
so TypeOf(form.ActiveControl) doesn't work in my case.
Any suggestions? I can be more specific if necessary.
Thanks!!!!
-K. L. Aelspear
-
Jul 28th, 2000, 01:40 PM
#2
Lively Member
Theres probably a better way but you could catch the click messages inside of each control, and put your menu stuff there. That way you would know where they clicked.
-
Jul 29th, 2000, 09:42 AM
#3
Thread Starter
New Member
One possible answer I found
A co-worker and I came up with a solution and I thought I'd post it here in case anyone was interested :
Declare a public variable to hold a string, then whenever
the click or mouseup event fires, save the control that it fired from in that string variable. Use if...then statements to check the string and a for...each statement to find all the controls of that particular control type.
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
|