Click to See Complete Forum and Search --> : Focus on a Command Button in VB6
agstanesby
April 24th, 2001, 09:09 AM
A doted border in a command button indicates
it has focus when it is clicked, right?...My problem is that I dont want the command button to show it has focus.
So can anyone tell me how to prevent the dotted border appearing in the command button when it is clicked?
Thanks.
LagMonster
April 24th, 2001, 10:58 AM
I don't know...make a seperate picture you can click on or something
...
why wouldn't you want that on a button?
LagMonster
April 24th, 2001, 11:07 AM
create a picture that has no 3d properties.
then put that in the right spot. I don't know how else to do it.
Private Sub Command1_Click()
Picture1.SetFocus
End Sub
agstanesby
April 24th, 2001, 12:29 PM
Originally posted by LagMonster:
I don't know...make a seperate picture you can click on or something
...
why wouldn't you want that on a button?
I'm developing a memory game where I don't want the user to have a visual reference to where they last clicked.
I was hoping there was a property or combination of properties that avoided using a redundant control to distract the focus from the command button.
Thanks anyway.
LagMonster
April 24th, 2001, 12:32 PM
Would a picture box work for you?
agstanesby
April 24th, 2001, 01:44 PM
Originally posted by LagMonster:
Would a picture box work for you?
As a replacement for the command button or to distract focus from the command button?
If you mean as a replacement, I prefer the characteristics that a command button has(If the user knows where to click, thats half the battle won).
If you mean as a distraction...the picture.setfocus in the command_click procedure definately does the job.
Thanks.
LagMonster
April 24th, 2001, 01:48 PM
Sorry I don't know the direct approach, but I am glad that you have it working the way you want. :)
fadel sheer
May 15th, 2001, 02:30 PM
You can add in your ON CLICK event to move focus to another hidden object that will not show tha last location of the cursor or focus by:
[object].setfocus