GETPAD( ) Function Example

The following program uses GETPAD( ) to test if the Edit menu name is on the Visual FoxPro system menu bar. If it is, GETPAD( ) returns the menu  name. (To restore the Edit menu bar to its default state, issue the command SET SYSMENU TO DEFAULT.)

FOR gnCount = 1 TO CNTPAD('_msysmenu')      && Number of pads
   IF PRMPAD('_msysmenu', GETPAD('_msysmenu', gnCount)) = 'Edit'
      RELEASE PAD (GETPAD('_msysmenu', gnCount)) OF _msysmenu
      EXIT
   ENDIF
ENDFOR