Hello everyone !
How can I kill the CommandButton's focus except for calling other
control's SetFocus event when MouseLeave Event occured after I clicked the
CommandButton in VFP9?

Thanks a lot!
Holy

Re: VFP9 KillFocus by man-wai

man-wai
Tue Aug 23 08:42:31 CDT 2005

> How can I kill the CommandButton's focus except for calling other
> control's SetFocus event when MouseLeave Event occured after I clicked the
> CommandButton in VFP9?

You can use an invisible object.setfocus().

what are you trying to do? Maybe there is another way around the problem?

--
.~. Might, Courage, Vision. http://www.linux-sxs.org
/ v \
/( _ )\ Linux 2.4.31
^ ^ 9:39pm up 1:16 1 user 0.15 0.21

Re: VFP9 KillFocus by holy

holy
Wed Aug 24 05:45:02 CDT 2005



"man-wai chang" wrote:

> > How can I kill the CommandButton's focus except for calling other
> > control's SetFocus event when MouseLeave Event occured after I clicked the
> > CommandButton in VFP9?
>
> You can use an invisible object.setfocus().
>
> what are you trying to do? Maybe there is another way around the problem?
>
> --
> .~. Might, Courage, Vision. http://www.linux-sxs.org
> / v \
> /( _ )\ Linux 2.4.31
> ^ ^ 9:39pm up 1:16 1 user 0.15 0.21
>
Thank you very much,man-wai chang ! Your suggestions are helpful,but your
method to kill a CommandButton's focus is still a way to call a object's
SetFocus() event. What I want is to solve the problem completely by invoking
Windows APIs ,so the result maybe looks like cliking an ActiveX ToolBar
button,as you know,the ToolBar button has no focus rectangle around it after
you click it.

Re: VFP9 KillFocus by Jack

Jack
Wed Aug 24 12:19:47 CDT 2005

On Wed, 24 Aug 2005 03:45:02 -0700, "holy"
<holy@discussions.microsoft.com> wrote:

>
>
>"man-wai chang" wrote:
>
>> > How can I kill the CommandButton's focus except for calling other
>> > control's SetFocus event when MouseLeave Event occured after I clicked the
>> > CommandButton in VFP9?
>>
>> You can use an invisible object.setfocus().
>>
>> what are you trying to do? Maybe there is another way around the problem?
>>
>> --
>> .~. Might, Courage, Vision. http://www.linux-sxs.org
>> / v \
>> /( _ )\ Linux 2.4.31
>> ^ ^ 9:39pm up 1:16 1 user 0.15 0.21
>>
>Thank you very much,man-wai chang ! Your suggestions are helpful,but your
>method to kill a CommandButton's focus is still a way to call a object's
>SetFocus() event. What I want is to solve the problem completely by invoking
>Windows APIs ,so the result maybe looks like cliking an ActiveX ToolBar
>button,as you know,the ToolBar button has no focus rectangle around it after
>you click it.

You can not do this with the Windows API. VFP objects like
commandbuttons are not Windows objects, they are painted on the form
by VFP.


Re: VFP9 KillFocus by holy

holy
Wed Aug 24 22:30:01 CDT 2005



"Jack Jackson" wrote:

> On Wed, 24 Aug 2005 03:45:02 -0700, "holy"
> <holy@discussions.microsoft.com> wrote:
>
> >
> >
> >"man-wai chang" wrote:
> >
> >> > How can I kill the CommandButton's focus except for calling other
> >> > control's SetFocus event when MouseLeave Event occured after I clicked the
> >> > CommandButton in VFP9?
> >>
> >> You can use an invisible object.setfocus().
> >>
> >> what are you trying to do? Maybe there is another way around the problem?
> >>
> >> --
> >> .~. Might, Courage, Vision. http://www.linux-sxs.org
> >> / v \
> >> /( _ )\ Linux 2.4.31
> >> ^ ^ 9:39pm up 1:16 1 user 0.15 0.21
> >>
> >Thank you very much,man-wai chang ! Your suggestions are helpful,but your
> >method to kill a CommandButton's focus is still a way to call a object's
> >SetFocus() event. What I want is to solve the problem completely by invoking
> >Windows APIs ,so the result maybe looks like cliking an ActiveX ToolBar
> >button,as you know,the ToolBar button has no focus rectangle around it after
> >you click it.
>
> You can not do this with the Windows API. VFP objects like
> commandbuttons are not Windows objects, they are painted on the form
> by VFP.
>
> Hello,Jack Jackson!
I have to express regret at that I may not kill a VFP button's focus by
using Windows APIs ! Thank you very very much!
holy

Re: VFP9 KillFocus by man-wai

man-wai
Thu Aug 25 06:55:57 CDT 2005

> Windows APIs ,so the result maybe looks like cliking an ActiveX ToolBar
> button,as you know,the ToolBar button has no focus rectangle around it after
> you click it.

Can't you just call the toolbar.button.click() method?


--
.~. Might, Courage, Vision. http://www.linux-sxs.org
/ v \
/( _ )\ Linux 2.4.31
^ ^ 7:55pm up 1 day 23:32 load average: 0.00 0.03 0.07

Re: VFP9 KillFocus by Gene

Gene
Thu Aug 25 12:10:16 CDT 2005

On Thu, 25 Aug 2005 19:55:57 +0800, man-wai chang
<toylet.toylet@gmail.com> wrote:

>> Windows APIs ,so the result maybe looks like cliking an ActiveX ToolBar
>> button,as you know,the ToolBar button has no focus rectangle around it after
>> you click it.
>
>Can't you just call the toolbar.button.click() method?

Sure, but that does not cause the click event to fire.

Sincerely,

Gene Wirchenko


Re: VFP9 KillFocus by man-wai

man-wai
Fri Aug 26 07:09:20 CDT 2005

> Sure, but that does not cause the click event to fire.

Maybe you could "MOUSE CLICK AT ..." the right coordinates. I don't
know how to get the coordinates though. :)

--
.~. Might, Courage, Vision. http://www.linux-sxs.org
/ v \
/( _ )\ Linux 2.4.31
^ ^ 8:08pm up 2 days 23:45 load average: 0.32 0.64 0.43