10 Replies - 13552 Views - Last Post: 25 November 2011 - 08:37 AM Rate Topic: -----

#1 rangapradamp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 09-November 11

A Simple Login Form in VB6.0

Posted 09 November 2011 - 11:16 AM

Hi Friends,
iam new here in dreamincode and new to vb6.0 , 1st of all i have doubt
iam preparing a simple login form ,and i want that in a simple way as
always. i dont want to use sql in this login form and so, for that i designed one
form with two labels and two text boxes, and in submit command button
i have used if condition to only check one condition just " if the utext = " " and
pwdtext = " " , show the form2 " and iam not satisfied with that code of my own
,in the same way i dont want to use the sql database , friends please help me or suggest me to design one
simple login screen with some more security concern...

Thank You...

Is This A Good Question/Topic? 0
  • +

Replies To: A Simple Login Form in VB6.0

#2 RexGrammer  Icon User is offline

  • Coding Dynamo
  • member icon

Reputation: 182
  • View blog
  • Posts: 783
  • Joined: 27-October 11

Re: A Simple Login Form in VB6.0

Posted 09 November 2011 - 12:27 PM

Please provide your specific problem rather than just "how to make this programme?"

Take a look in these articles The if-else Statement, The Textbox Class. (At least for starters)

This post has been edited by RexGrammer: 09 November 2011 - 12:27 PM

Was This Post Helpful? 0
  • +
  • -

#3 rangapradamp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 09-November 11

Re: A Simple Login Form in VB6.0

Posted 09 November 2011 - 12:38 PM

hi rexgrammer thanks for your reply , i had a walkthrough the IF statement tutorials,

i have one doubt,
is it possible to design and impliment a login form without a backend connection?
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9498
  • View blog
  • Posts: 35,845
  • Joined: 12-June 08

Re: A Simple Login Form in VB6.0

Posted 09 November 2011 - 12:41 PM

If you don't have a back end where will you store the various nameas and passwords? In a text file? That's a backend of sorts. In the code? How will you add new uses? Recompile it and distribute it each time?

An odd way of going about it!
Was This Post Helpful? 0
  • +
  • -

#5 guyfromri  Icon User is offline

  • D.I.C Addict

Reputation: 46
  • View blog
  • Posts: 819
  • Joined: 16-September 09

Re: A Simple Login Form in VB6.0

Posted 09 November 2011 - 12:47 PM

View Postmodi123_1, on 09 November 2011 - 02:41 PM, said:

If you don't have a back end where will you store the various nameas and passwords? In a text file? That's a backend of sorts. In the code? How will you add new uses? Recompile it and distribute it each time?

An odd way of going about it!


Soooooo...although I agree with this, when I was learning, I did it this way once...

I wrote a little program with a login form for 4-5 people to use. It didn't matter who logged on to use it and when so I didn't have to track.

My theory is..if you're brand new and you want to learn the basics of how the form works and how to implement the IF statements correctly before you learn where the form compares it's data to, this wouldn't be an awful way to go. You don't have to worry about connections and what not, just getting the form to compare to the name/pw correctly and take the right course of action depending on the result.

Remember though -- There's always a way to get to the source code so anyone with a little knowledge could probably get in and find out what the code reads to log in...

This post has been edited by guyfromri: 09 November 2011 - 12:47 PM

Was This Post Helpful? 0
  • +
  • -

#6 chuckjessup  Icon User is offline

  • D.I.C Regular

Reputation: 33
  • View blog
  • Posts: 380
  • Joined: 26-October 09

Re: A Simple Login Form in VB6.0

Posted 23 November 2011 - 05:32 PM

View Postguyfromri, on 09 November 2011 - 11:47 AM, said:

View Postmodi123_1, on 09 November 2011 - 02:41 PM, said:

If you don't have a back end where will you store the various nameas and passwords? In a text file? That's a backend of sorts. In the code? How will you add new uses? Recompile it and distribute it each time?

An odd way of going about it!


Soooooo...although I agree with this, when I was learning, I did it this way once...

I wrote a little program with a login form for 4-5 people to use. It didn't matter who logged on to use it and when so I didn't have to track.

My theory is..if you're brand new and you want to learn the basics of how the form works and how to implement the IF statements correctly before you learn where the form compares it's data to, this wouldn't be an awful way to go. You don't have to worry about connections and what not, just getting the form to compare to the name/pw correctly and take the right course of action depending on the result.

Remember though -- There's always a way to get to the source code so anyone with a little knowledge could probably get in and find out what the code reads to log in...


I would suggest not hard coding the passwords into the application its self... i used to do that and if you forget the passwords it is all over... you cant use that application again... i have found that you can use a text file or even a simple Random Access File, If you would like read my blog about log ins and even encryption, i use a standard log in form, and in the main application i use a "Admin" window for use of adding deleting and changing users and passwords... There is the easy way to do it...

You could use a database service, like sqlight or MS Sql Server... but it depends on your needs...

Hope this was helpful

Jesse Fender
Was This Post Helpful? 0
  • +
  • -

#7 RexGrammer  Icon User is offline

  • Coding Dynamo
  • member icon

Reputation: 182
  • View blog
  • Posts: 783
  • Joined: 27-October 11

Re: A Simple Login Form in VB6.0

Posted 24 November 2011 - 11:32 AM

I had an surge of inspiration...
I dissassembled a program in OllyDBG and remembered how a program would check a serial for a specific username (ofcourse in an offline mode [that is with no backend and with no connection])

You could use an algorithm to make a password for a username...
For an example:
take every second letter from the username, then double the ASCII values of every character, reverse the gained string, and add a set of numbers...

Of course this would limit to one username having a single specific password...

You could also do it the other way around: make a username for a specific password...

Besides this and the above mentioned there is no other way to do it without a back-end (I think but don't trust me :) )
Was This Post Helpful? 0
  • +
  • -

#8 chuckjessup  Icon User is offline

  • D.I.C Regular

Reputation: 33
  • View blog
  • Posts: 380
  • Joined: 26-October 09

Re: A Simple Login Form in VB6.0

Posted 24 November 2011 - 12:22 PM

View PostRexGrammer, on 24 November 2011 - 10:32 AM, said:

I had an surge of inspiration...
I dissassembled a program in OllyDBG and remembered how a program would check a serial for a specific username (ofcourse in an offline mode [that is with no backend and with no connection])

You could use an algorithm to make a password for a username...
For an example:
take every second letter from the username, then double the ASCII values of every character, reverse the gained string, and add a set of numbers...

Of course this would limit to one username having a single specific password...

You could also do it the other way around: make a username for a specific password...

Besides this and the above mentioned there is no other way to do it without a back-end (I think but don't trust me :) )



I think thay is an interesting way to look at it, specially the encryption method you chose... the only non back end login procedure that i know of is a hard coded username(s) and password(s)... the issue here is if you have an issue there is no way to recover your password, add more users or do much of anything with out making a new compilation.

another thing to looking re the ascii thing is that i think it would work as long as the char set had the ascii chars to support it, or find a way to roll the excess over... for instance if there are say 255 ascii chars, what happens if the user the 254th char...?

Lastly i would encourage you to look into flat file databases which dont use connections, but allow you to modify the users settings, They work fine for small applications, and they were my first real secure login that i made... its not hard to encode the strings so that they are not in plain text... bigger applications tend to want bigger databases, but the flat file will help you understand whats going on....

im a big proponent in not using databases like sql to store data, for me they are bulky and hard to do what i need done, so i support flatfile back ends... and i think they would work well for you. i dont even use hard coded credentials anymore everything of mine are stored in the files.

Jesse Fender
Was This Post Helpful? 0
  • +
  • -

#9 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 303
  • View blog
  • Posts: 1,796
  • Joined: 26-March 09

Re: A Simple Login Form in VB6.0

Posted 24 November 2011 - 12:51 PM

The method type you've suggested is more suited for example, serial numbers for software, whereby you can have a tool that will generate "random" codes, that mean exactly the same thing to the software, because of the way the information is encrypted.

Nothing stopping you using a flat file and encrypting the data that goes in there if it's a security issue you have. That way you get the best of both worlds, because the user has the ability to have whatever password he wants and not one you give him and is also able to change his password should he wish (should you chose to write that function).
Was This Post Helpful? 0
  • +
  • -

#10 RexGrammer  Icon User is offline

  • Coding Dynamo
  • member icon

Reputation: 182
  • View blog
  • Posts: 783
  • Joined: 27-October 11

Re: A Simple Login Form in VB6.0

Posted 24 November 2011 - 12:51 PM

-For the ASCII thing I suppose that someone will use numbers and letters for his username (then it all fits in)
-There are infinite number of user names available they just need to have the correct password so it's ok (by me)
-And for the pass recovery just apply that algorithm manually to any username and get the corresponding password


P.S.
I was just thinking of a non back-end solution to this problem. Of course it's better to use a back-end (in most cases)...

I got the idea from the serial numbers for software...

This post has been edited by RexGrammer: 24 November 2011 - 12:53 PM

Was This Post Helpful? 0
  • +
  • -

#11 chuckjessup  Icon User is offline

  • D.I.C Regular

Reputation: 33
  • View blog
  • Posts: 380
  • Joined: 26-October 09

Re: A Simple Login Form in VB6.0

Posted 25 November 2011 - 08:37 AM

View PostRexGrammer, on 24 November 2011 - 11:51 AM, said:

-For the ASCII thing I suppose that someone will use numbers and letters for his username (then it all fits in)
-There are infinite number of user names available they just need to have the correct password so it's ok (by me)
-And for the pass recovery just apply that algorithm manually to any username and get the corresponding password


P.S.
I was just thinking of a non back-end solution to this problem. Of course it's better to use a back-end (in most cases)...

I got the idea from the serial numbers for software...


Ok... its your choice, I am just saying that it may not be as easy to do that as it seems, give it a try though... You can always revert to other means later.

The serial number sounds cool, you can find ready made generators out there and validation codes...

Best wishes-
Jesse Fender
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1