Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: munir hossain
  Where is munir hossain?
 dhaka
 Bangladesh
 munir hossain
 To: Karben Selim Mejia
  Where is Karben Selim Mejia?
 San Pedro Sula
 Honduras
 Karben Selim Mejia
 Tags
Subject: RE: password protection
Thread ID: 16183 Message ID: 16199 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Friday, October 11, 2002 8:50:10 AM         
   


> >
> > hello there
> > i created few form and want to enter password when user run those form.how can i do this? please
> > help me.i place a text box to hold a password but don't know how i do it.
>
> maybe this could lead you in the path
>
>
> LOCAL oPasswordedForm as Form, txtPassword as TextBox 
> SET talk OFF
> SET NOTIFY OFF
> 
> oPasswordedForm = CREATEOBJECT("form")
> 
> oPasswordedForm.AutoCenter = .T.
> oPasswordedForm.Caption="Please enter your password.."
> oPasswordedForm.Height=125
> oPasswordedForm.Width =255
> oPasswordedForm.AddObject("txtPassword","MyPasswordedTextBox")
> oPasswordedForm.txtPassword.Visible = .T.
> oPasswordedForm.AddObject("cmdExit","MyExitButton")
> oPasswordedForm.cmdExit.Visible = .T.
> oPasswordedForm.Show
> READ event
> 
> 
> DEFINE CLASS MyPasswordedTextBox as TextBox 
> 	Visible 		= .T.
> 	PasswordChar 	= [*]
> 	selectonentry	= .t.
> 	Left 			= 75
> 	Top  			= 25
> 	TabIndex		= 1
> 	
> 
> 	PROCEDURE VALID 
> 		lValueReturn = .T.
> 		IF !EMPTY(This.Value) then
> 			IF ALLTRIM(This.Value) = "mypassword" then
> 				MESSAGEBOX("password correct!")
> 			ELSE
> 				MESSAGEBOX("Password Icorrect!")
> 				lValueReturn = .F.
> 			ENDIF
> 		ENDIF
> 		RETURN lValueReturn 
> ENDDEFINE
> 
> DEFINE CLASS MyExitButton as COMMANDBUTTON
> 	Visible 		= .T.
> 	Left 			= 85
> 	Top  			= 85
> 	Width 			= 80
> 	Height			= 30
> 	caption			= "Exit"
> 	
> 
> 	PROCEDURE CLICK
> 		ThisForm.Release
> 		CLEAR EVENTS 
> ENDDEFINE
> 

>
> regards
> Karben Selim Mejia
>
> I always have the last word in my home, "Yes sweet heart, what ever you say"
>
> Honduras, Central America
> The very center of the world


But if i want to give user a choice to change password from a form for my software
how i will do it.

ENTIRE THREAD

password protection Posted by munir hossain @ 10/10/2002 10:44:32 PM
RE: password protection Posted by Karben Selim Mejia @ 10/10/2002 11:18:52 PM
RE: password protection Posted by munir hossain @ 10/11/2002 8:50:10 AM
RE: password protection Posted by Pete Sass @ 10/11/2002 11:08:38 AM