Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ON KEY LABEL RIGHTMOUSE DO....
Message
 
 
To
03/10/2001 10:47:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00563610
Message ID:
00563617
Views:
15
There is no need to use ON KEY LABEL RIGHTMOUSE in VFP. You can use RightClick Event of a form or controls instead.

>Hello,
>
>I am just converting FPW codes to VFP6 but the command :
>
>ON KEY LABEL RIGHTMOUSE DO abc.PRG did not worked because it stops on the field I select the right mouse.
>
>Then I decide to change to ON KEY LABEL ENTER DO abc.PRG , it works with ENTER key instead of rightmouse click key.
>
>Any help would really appreciated
>PP
>
>the codes of ABC.prg as follows:
>
>procedure abc
>
>release code_name, field_name, loc_code
>public code_name, field_name, loc_code
>if rdlevel() = 0
> wait window "No fields chosen" timeout 5
> return
>endif
>
>push key clear
>
>cPopAlias=alias()
>
>do case
> case type("m.grm_type") # "U" .and. _curobj = objnum(m.grm_type)
> do popList with 4,"~TRU|~TCH|~MAJ|~DEP|","~Thru-Min|~Touch Up|~Major|~Deep|","m.grm_type"
> case type("m.ifs_access") # "U" .and. _curobj = objnum(m.ifs_access)
> do popList with 3,"~Y|~N|~-|","~Yes|~No|~ |","m.ifs_access"
> otherwise
> do DispErr with "No Popop available"
>
>endcase
>
>if ! empty(cPopAlias)
> select &cPopAlias
>endif
>pop key
>
>procedure assign_val
>parameters place_value,actual_value
>&place_value = actual_value
>deactivate popup code_select
>release popup code_select
>
>procedure PopList
> parameters nOptions,cOptions,cOptionExplanations,cFieldVar
> define popup code_select from 10,32 scroll title " Choices "
> dimension cCurOpt(nOptions),cCurOptExpl(nOptions)
> for nOptionCounter = 1 to nOptions
> cCurOpt(nOptionCounter) =subs(cOptions,at('~',cOptions,nOptionCounter)+1,at('|',cOptions,nOptionCounter)-(at('~',cOptions,nOptionCounter)+1))
> cCurOptExpl(nOptionCounter)=subs(cOptionExplanations,at('~',cOptionExplanations,nOptionCounter)+1,at('|',cOptionExplanations,nOptionCounter)-(at('~',cOptionExplanations,nOptionCounter)+1))
> define bar nOptionCounter of code_select prompt cCurOpt(nOptionCounter)+" - "+cCurOptExpl(nOptionCounter)
> c='on selection bar '+allt(str(nOptionCounter))+' of code_select do assign_value with cFieldVar,"'+cCurOpt(nOptionCounter)+'"'
> &c
> next
> activate popup code_select
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform