I'm writing this right here because i'm so BOOOOREEEDDDDDDD And i wanna program but can't because i'm not home so here this is
What you need
1 text box - txtPassword
1 Command button - cmdSubmit
Code:Option Explicit Private Sub cmdSubmit_click() If (txtPassword.text = ("Password")) Then Call Msgbox ("Access granted",vbinformation,"Success") Else Call Msgbox ("Access denied",vbinformation,"Error") End if End Sub
Results 1 to 26 of 26
Thread: [vb6]password protection
- 26 Nov. 2009 04:01pm #1
[vb6]password protection
- 26 Nov. 2009 04:40pm #2
- 26 Nov. 2009 05:54pm #3
- 26 Nov. 2009 09:48pm #4
Hey chad, when you get back home, dont forget to add me.
ontopic : this is easy to bypass, but useful to somepeople. I want to see the encrypted one when you get home ;D
- 26 Nov. 2009 10:01pm #5
How would you bypass it?
Also, you don't need the () around "Password"
- 26 Nov. 2009 10:42pm #6
- 26 Nov. 2009 10:46pm #7
- 26 Nov. 2009 11:58pm #8
- 27 Nov. 2009 03:29am #9
- 27 Nov. 2009 01:09pm #10
- 27 Nov. 2009 06:45pm #11I know it's not needed but it's good programming practice and it's also cleaner.
Believe it or not the password would actually appear in plaintext if you opened it in any text editor.
- 27 Nov. 2009 08:37pm #12The standard is actually to not use parenthesis where they aren't required, because it's cleaner without them. >_>
- 27 Nov. 2009 09:13pm #13
lol. Not around strings, you don't. You use them around functions, operators, etc., but not around something that isn't part of a group.
It's debatable as to whether or to use them around a multiple if statement:
if ((part1 == 2) && (part2 == 3))
versus
if (part1 == 2 && part2 == 3)
Because it groups the sections of the if statement.
However, a single string isn't being grouped with anything but itself. The point of grouping is so that you can see what all that string/statement/whatever is a part of. It's obviously a part of itself and doesn't need parenthesis to denote that.
- 27 Nov. 2009 09:19pm #14
- 27 Nov. 2009 09:22pm #15
Because you're implying that your method is in any way standard or cleaner.
- 27 Nov. 2009 10:31pm #16
I think he is just saying that it is another way of coding he can state that he likes it one way rather than the other, Maybe it may be cleaner to him, maybe you don't like to use it and thats fine.
Its kinda like the " 'Blah Blah Blah " function some people like to leave notes, I personally don't because it adds lines, and looks nicer without them to me... But thats me...
It's just all based on opinion... He may see it as cleaner but who cares (No offence meant to either of you)...Last edited by Eternal Darkness; 27 Nov. 2009 at 10:35pm.
- 28 Nov. 2009 04:17am #17
That's fine if it's his programming preference. I've had my share of strange coding habits over the years. It was his response of saying that it's "good programming practice" and "cleaner" that threw me off, as I've never heard of anyone doing that for any language. It's certainly not standard.
- 28 Nov. 2009 05:38am #18
- 28 Nov. 2009 05:56am #19
- 28 Nov. 2009 06:40am #20
What is possibly the point of this "password protection"?
- 28 Nov. 2009 06:57am #21
- Age
- 30
- Join Date
- Nov. 2009
- Location
- Anaheim, California
- Posts
- 1,065
- Reputation
- 99
- LCash
- 200.00
- 29 Nov. 2009 02:08am #22
- 29 Nov. 2009 03:03am #23
- 29 Nov. 2009 05:58am #24
- 29 Nov. 2009 03:44pm #25
Oh alright. Sorry didn't understand that.
- 29 Nov. 2009 04:12pm #26