Tutorial Making a login form
#1
Hey all OMA s,

I was making today simple login form, thought I'd share it with you.
Keep in mind that it shouldn't be hard to crack, so don't use it if you want good protection.

Usages
  • trolling brother / sister
  • trolling IT teacher
  • general protection of your applications from unwanted viewers
  • OMA

So, let's get things started.
First start with making some nice GUI, like this :
[Image: QeLlJn9sbr.png]

If you want to, make textlabel under Login! button to show if login failed or not.

Set the property of password textboxUseSystemPasswordChar to true
[Image: lKcgacFfNb.png]
This will prevent anyone from seeing your password.

Now, let's write some code. We want it to work like this :
[Image: 6VJsQM8X1l.png]
Let's get started double clicking the 'Login!' button and adding the code checking if username / password is valid. TextBox1 is login and TextBox2 is password.
Code:
if(this->TextBox1->Text == "Orange" && this->TextBox2->Text == "orange") { MessageBox::Show("Login succesfull!"); //do stuff }

Next thing we might like to add is what the program should do, if username / password does not match the set ones. I will use the code from above.

Code:
if(this->TextBox1->Text == "Orange" && this->TextBox2->Text == "orange") { MessageBox::Show("Login succesfull!"); //do stuff } else { MessageBox::Show("Invalid login or password! Please try again!"); }


If you have a basic knowledge in any programming language, you should be able to understand what the code does. If not, explanation is here.\

Code:
if(this->TextBox1->Text == "Orange" && this->TextBox2->Text == "orange")
This line check if text in textbox1 is equal to "Orange" and the text in textbox2 is equal to "orange" which is my password. The && makes that 'Login succesfull' will pop up only if both arguments are valid.

If something does not match our pw / login, user will get a nice 'Invalid login' box.

That's it, hope you enjoyed the tutorial. If something's not clear, feel free to ask in the thread.

Don't forget to press that [Image: postbit_reputation.gif] button for more releases or tutorials! Rolleyes

[Image: lQDUjba.jpg]
Reply

#2
This is so secure. Thanks, I will use it I think.


brb porting entire ItsMods db into the login.php.
Reply

#3
(01-31-2012, 21:56)SuperNovaAO Wrote: This is so secure. Thanks, I will use it I think.


brb porting entire ItsMods db into the login.php.

Quote:Keep in mind that it shouldn't be hard to crack, so don't use it if you want good protection.

blind or what..
Where did I say 'It's a commercial system, with uncrackable encryption algorithm, I've written it for a bank' ?
[Image: lQDUjba.jpg]
Reply

#4
(01-31-2012, 21:56)SuperNovaAO Wrote: This is so secure. Thanks, I will use it I think.


brb porting entire ItsMods db into the login.php.

My sarcasminator has exploded!
HELP!
Reply

#5
@SuperNovaAO

[Image: 6cum0.jpg]
Reply

#6
(01-31-2012, 22:02)jariz Wrote: @SuperNovaAO

[Image: 6cum0.jpg]

Did you repair my sarcasminator?

Oh no wait, that's not mine... mine is version 2.3...
Reply

#7
Derailed because an admin acted like a douchebag, gg
[Image: MaEIQ.png]
Reply

#8
the admin = a douchebag


inb4 ban
Reply

#9
(01-31-2012, 21:58)OrangePL Wrote:
(01-31-2012, 21:56)SuperNovaAO Wrote: This is so secure. Thanks, I will use it I think.


brb porting entire ItsMods db into the login.php.

Quote:Keep in mind that it shouldn't be hard to crack, so don't use it if you want good protection.

blind or what..
Where did I say 'It's a commercial system, with uncrackable encryption algorithm, I've written it for a bank' ?

Code:
I only read stuff in code tags.

Now back to topic.
Reply

#10
and how is possible to take a login && password from a db? Lets say, a html, that contains Usernames: and Password:
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Making an apocalyptic themed Minecraft map AZUMIKKEL 54 41,175 08-31-2013, 02:54
Last Post: AZUMIKKEL
  [Request] Login / Register System? South2AKA 5 6,869 07-17-2013, 13:50
Last Post: surtek
  Help MW3 Admin Rcon login PW guru 6 11,694 07-14-2013, 21:18
Last Post: guru
  Making a Heli's angles match my angles? akillj 1 4,120 06-16-2013, 15:01
Last Post: Yamato
  Making a harrier crash into the map? akillj 6 7,215 06-09-2013, 05:57
Last Post: akillj
Brick Lesson 3: Making game in C++ Nekochan 2 5,255 06-03-2013, 15:25
Last Post: Nekochan
  Making a gametype multi-rounded? DidUknowiPwn 6 6,528 04-22-2013, 22:14
Last Post: Pozzuh
Information [Tutorial] Making MORE glass in your form. Nekochan 27 18,035 03-22-2013, 22:04
Last Post: kokole
Rainbow Lesson 1: Making game in C++ Nekochan 6 7,065 02-04-2013, 15:27
Last Post: Nekochan
Rainbow Lesson 2: Making game in C++ Nekochan 1 3,841 02-04-2013, 15:14
Last Post: Ich1994

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.