Login screen

Reply

Join Date: Aug 2005
Posts: 20
Reputation: satrix36 is an unknown quantity at this point 
Solved Threads: 0
satrix36 satrix36 is offline Offline
Newbie Poster

Login screen

 
0
  #1
Sep 28th, 2005
Hi everyone,

I'm making yet another program, and i am needing a login screen. The first form has 2 edit boxes and 2 buttons. The cancel button closes the program, the login button checks the username password if there correct or not. I have written the code for the login button but an error message keeps apearing every time I click the login button. The code that i have user is as follows:

begin
If edit1.Text='Admin' Then
Begin
Edit1.Readonly:=true;
end
else
If edit2.Text='1234' Then
Begin
form2.Visible:=True;
end
else
Begin
ShowMessage('Incorrect username and password');
end;

Could someone please help me out.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 41
Reputation: mrmike is an unknown quantity at this point 
Solved Threads: 0
mrmike mrmike is offline Offline
Light Poster

Re: Login screen

 
0
  #2
Oct 7th, 2005
What is the error cos the above code is ok

if enters Admin sets the editbox to readonly
if enters 1234 shows form2

if neither above are true then shows 'Incorrect username and password'
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 20
Reputation: satrix36 is an unknown quantity at this point 
Solved Threads: 0
satrix36 satrix36 is offline Offline
Newbie Poster

Re: Login screen

 
0
  #3
Oct 7th, 2005
I've figured it out now.
Thank you for ur help.

Just a quick question, How would I encrypted the username and password?
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 3
Reputation: malditcha87 is an unknown quantity at this point 
Solved Threads: 0
malditcha87 malditcha87 is offline Offline
Newbie Poster

Re: Login screen

 
0
  #4
Mar 16th, 2009
Originally Posted by satrix36 View Post
I've figured it out now.
Thank you for ur help.

Just a quick question, How would I encrypted the username and password?
how did you do it in your login screen?? that's also one of my problem.. I'm doing a system that has a login screen and if the privilege is student then it will open immediately the student forms which can only view the information. Thus, if the privilege is physician then it can add, edit and view the information. But, still, I don't know how to do it..
Don't worry if you have a little time to sleep. There's a lot of time when your dead!
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 3
Reputation: malditcha87 is an unknown quantity at this point 
Solved Threads: 0
malditcha87 malditcha87 is offline Offline
Newbie Poster

Re: Login screen

 
0
  #5
Mar 16th, 2009
Originally Posted by satrix36 View Post
I've figured it out now.
Thank you for ur help.

Just a quick question, How would I encrypted the username and password?
how did you do it in your login screen?? that's also one of my problem.. I'm doing a system that has a login screen and if the privilege is student then it will open immediately the student forms which can only view the information. Thus, if the privilege is physician then it can add, edit and view the information. But, still, I don't know how to do it..
Don't worry if you have a little time to sleep. There's a lot of time when your dead!
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 35
Reputation: m610 is an unknown quantity at this point 
Solved Threads: 1
m610 m610 is offline Offline
Light Poster

Re: Login screen

 
0
  #6
Mar 23rd, 2009
I'm guessing you were getting an access violation error, which usually means you are trying to access properties of an object that has not yet been created. Has form2 been created already but has been hidden or visible:=false?

For encryptions, depends on how secure you need it to be. Some easy things you can do is:

1. Add an offset to each character, like "M" is an ASCII 77, so replace it with ASCII 127, for example. Similarly, you could do all sort of character-by-character operations, like vary the offset according to the position in the string, or make other bit-level changes.

2. Jumble the letters

3. Mix the string in with another long and randomly generated string.

4. Use a public-key type routine. The math is easy, but to be effective you have to use some big numbers.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 3
Reputation: malditcha87 is an unknown quantity at this point 
Solved Threads: 0
malditcha87 malditcha87 is offline Offline
Newbie Poster

Re: Login screen

 
0
  #7
Mar 23rd, 2009
Originally Posted by malditcha87 View Post
how did you do it in your login screen?? that's also one of my problem.. I'm doing a system that has a login screen and if the privilege is student then it will open immediately the student forms which can only view the information. Thus, if the privilege is physician then it can add, edit and view the information. But, still, I don't know how to do it..
do you know who to change the dbgrid menutitle?
Don't worry if you have a little time to sleep. There's a lot of time when your dead!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Pascal and Delphi Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC