×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Please help me with FoxPro 2.6 for DOS

Please help me with FoxPro 2.6 for DOS

Please help me with FoxPro 2.6 for DOS

(OP)
I am currently working on a fox pro assignment and having the following two PROBLEMS:
1. I am trying to use a password to log on to the application but can not get it to be disguised when entered. I have tried to use the function r and to set color to x. However, I am obivously not doing it right.
2. I am having problems with popup menus. They are working but if I call a menu from a menu and then try to get back to the calling menu, I run into difficulties. I reliase that the bar() is a public function and that it thinks that I want to perform the operation corresponding to the bar selected in the calling menu on the called menu. P.S. I have wrote too much code to use the menu builder which I have only found out about, if I am to reach the deadline.

RE: Please help me with FoxPro 2.6 for DOS

1. The easiest way to do this in FPD is set the color to black on black: n/n.

2. I'm not sure I completely follow you, but you can assign the value of BAR() to a variable at the top of the program, thus preserving its value even after another menu item is called.

foxdev.com

RE: Please help me with FoxPro 2.6 for DOS

For Your Menu Problem, Have You Tried Push Menu and Pop Menu ?

procedure CUSTMENU
************************************************************************************
push menu _msysmenu
set sysmenu to
do custaddr.mpr
pop menu _msysmenu
return




For For Your password problem.

*/***************************************************************************
*/Program : Function Password
*/System :
*/Purpose : Checks a Entered String against a password and return a logical
*/Syntax : lcPassword = Password(Row,Clm)
*/Returns : string , password enrtered
*/Parameter : Integer - Row - The screen row where the input is to be
*/ : Integer - Clm - The screen column where the input is to be
*/Defaults : Row = 0
*/ : Clm = 0
*/Requires : Nothing
*/Changes : Nothing
*/Calls :
*/Version : 1.0
*/Dated : 05/28/1989
*/Written By: David W. Grewe
*/***************************************************************************
*& Utility - Security
*/***************************************************************************
*/ Record Of Change
*/
*/***************************************************************************
parameters PnROW , PnCOL
private PnROW , PnCOL , P_VER
private L_PARA , LcMsg , LcCol , LcPassWord , LnKEY , LcDISPLAY
L_PARA = parameters()
if L_PARA < 2 .or. type('PnROW') <> "N" .or. type('PnCOL') <> "N"
PnCOL = int((scols()-40)/2)
PnROW = int((srows()-4)/2)
endif
*****
*****
* Initialize the password variable so it can be retrieved.
LcPassWord = ""
LcMsg = "Enter Password"
LcCol = len(LcMsg) + 25
PnROW = iif(PnROW < 0, int((srows()-4)/2), iif(PnROW > srow(), srow()-4, PnROW))
PnCOL = iif(PnCOL < 0, int((scols()-40)/2),iif(PnCOL > scol(), scol()-44, PnCOL))
LnKEY = 0
LcDISPLAY=""
set escape off
set cursor off
define window password from PnROW,PnCOL to PnROW+2,PnCOL+30 system noclose nogrow nofloat nozoom nomdi color scheme 8
activate window password
@ 0,0 say LcMsg
do while len(LcPassWord) < 10
LnKEY=inkey()
do case
case LnKEY = 13 && Return key
exit
case LnKEY = 27 && Escape key
LcDISPLAY = ''
LcPassWord = ''
case LnKEY = 127 && Backspace key
LcPassWord = left(LcPassWord, len(LcPassWord)-1)
LcDISPLAY = replicate("*",len(LcPassWord))
case between(LnKEY,48,57) && a Number
LcPassWord = LcPassWord + chr(LnKEY)
LcDISPLAY = replicate("*",len(LcPassWord))
case between(LnKEY,65,90) && a Upper Case Letter
LcPassWord = LcPassWord + chr(LnKEY)
LcDISPLAY = replicate("*",len(LcPassWord))
case between(LnKEY,97,122) && a Lower Case Letter
LcPassWord = LcPassWord + chr(LnKEY)
LcDISPLAY = replicate("*",len(LcPassWord))
endcase
@ 0,len(LcMsg)+2 say LcDISPLAY
enddo
set escape on
set cursor on
release window password
release PnROW , PnCOL , PcVER
release L_PARA , LcMsg , LcCol , LnKEY , LcDISPLAY
return LcPassWord

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close