What do you mean by "want to sink the
active button for the
one that is active?" If you mean, by
active button, the last one to be clicked, then this hack will come close:
At any rate, what you'd have to do is to use textboxes as faux command buttons. Textboxes have a click event just like a button, and so they can be used to execute code.
In the Property Box format each textbox initially to look like a "normal" button. You can select all three and format them at the same time:
Special Effect
Raised
Back color (you
must have the minus sign in front of the number)
-2147483633
Control Source
= "My Fake Button Caption"
Text Align
Center
Place a command button on the form, hit
Cancel (it won't have code behind it because it doesn't do anything) and name it
PhantomButton. Place it in the lefthand, bottom corner of your form, and shrink it as small as possible.
Then place this code behind the textboxes:
-
Private Sub TextBox1_Click()
-
TextBox1.SpecialEffect = 2
-
TextBox2.SpecialEffect = 1
-
TextBox3.SpecialEffect = 1
-
'Place code to be executed here
-
PhantomButton.SetFocus
-
End Sub
-
-
Private Sub TextBox2_Click()
-
TextBox1.SpecialEffect = 1
-
TextBox2.SpecialEffect = 2
-
TextBox3.SpecialEffect = 1
-
'Place code to be executed here
-
PhantonButton.SetFocus
-
End Sub
-
-
Private Sub TextBox3_Click()
-
TextBox1.SpecialEffect = 1
-
TextBox2.SpecialEffect = 1
-
TextBox3.SpecialEffect = 2
-
'Place code to be executed here
-
PhantonButton.SetFocus
-
End Sub
Placing focus on
PhantonButton takes the cursor away from the textbox cum button,; otherwise the cursor would blink on the "button" and destroy the illusion!
Linq
;0)>