Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. VB password help

VB password help

Scheduled Pinned Locked Moved Visual Studio
help
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    arranmc182
    wrote on last edited by
    #1

    im trying to make a program that makes u enter a password inorder to use a program the only problem is that u can see the pass word that istyped i would like to hide it so u just see *** insted of text here is my code .......................................... Public Class Form Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Password As String Dim InputPassword As String Dim Attempt As Integer Password = "test" Attempt = 0 Do InputPassword = InputBox("Enter password. This is attempt number " & Attempt & ".") Attempt = Attempt + 1 Loop Until (Attempt = 3) Or (InputPassword = Password) If InputPassword = Password Then MsgBox("This password is valid!") Dim F1 As New Form1() F1.Show() Else MsgBox("This password is invalid!") End If End Sub End Class

    C O 2 Replies Last reply
    0
    • A arranmc182

      im trying to make a program that makes u enter a password inorder to use a program the only problem is that u can see the pass word that istyped i would like to hide it so u just see *** insted of text here is my code .......................................... Public Class Form Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Password As String Dim InputPassword As String Dim Attempt As Integer Password = "test" Attempt = 0 Do InputPassword = InputBox("Enter password. This is attempt number " & Attempt & ".") Attempt = Attempt + 1 Loop Until (Attempt = 3) Or (InputPassword = Password) If InputPassword = Password Then MsgBox("This password is valid!") Dim F1 As New Form1() F1.Show() Else MsgBox("This password is invalid!") End If End Sub End Class

      C Offline
      C Offline
      ChandraRam
      wrote on last edited by
      #2

      I dont think using an InputBox is a very good method. You will need to make a login form.

      A 1 Reply Last reply
      0
      • A arranmc182

        im trying to make a program that makes u enter a password inorder to use a program the only problem is that u can see the pass word that istyped i would like to hide it so u just see *** insted of text here is my code .......................................... Public Class Form Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Password As String Dim InputPassword As String Dim Attempt As Integer Password = "test" Attempt = 0 Do InputPassword = InputBox("Enter password. This is attempt number " & Attempt & ".") Attempt = Attempt + 1 Loop Until (Attempt = 3) Or (InputPassword = Password) If InputPassword = Password Then MsgBox("This password is valid!") Dim F1 As New Form1() F1.Show() Else MsgBox("This password is invalid!") End If End Sub End Class

        O Offline
        O Offline
        originSH
        wrote on last edited by
        #3

        This is the Visual Studio forum for the Visual Studio IDE ... not the languages it supports ... your looking for the VB forum which is a few links up ;)

        P 1 Reply Last reply
        0
        • C ChandraRam

          I dont think using an InputBox is a very good method. You will need to make a login form.

          A Offline
          A Offline
          arranmc182
          wrote on last edited by
          #4

          ChandraRam if u could post up the code on how to do that that would be a verry big help

          P 1 Reply Last reply
          0
          • O originSH

            This is the Visual Studio forum for the Visual Studio IDE ... not the languages it supports ... your looking for the VB forum which is a few links up ;)

            P Offline
            P Offline
            Paul Conrad
            wrote on last edited by
            #5

            He's already cross posted in the VB forum, I think.

            "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

            1 Reply Last reply
            0
            • A arranmc182

              ChandraRam if u could post up the code on how to do that that would be a verry big help

              P Offline
              P Offline
              Paul Conrad
              wrote on last edited by
              #6

              arranmc182 wrote:

              post up the code on how to do that

              It is pretty straightforward. No different than any other form.

              "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

              A 1 Reply Last reply
              0
              • P Paul Conrad

                arranmc182 wrote:

                post up the code on how to do that

                It is pretty straightforward. No different than any other form.

                "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                A Offline
                A Offline
                arranmc182
                wrote on last edited by
                #7

                well im not a programmer at all im doing networking at college and they are making us do some programming as part of it and iv got realy stuck with this one

                P 1 Reply Last reply
                0
                • A arranmc182

                  well im not a programmer at all im doing networking at college and they are making us do some programming as part of it and iv got realy stuck with this one

                  P Offline
                  P Offline
                  Paul Conrad
                  wrote on last edited by
                  #8

                  Well, you start with textboxes for the username and password. The textbox for the password, use the PasswordChar property to asterisk out the characters being entered. Then, you have your buttons for accept or cancel. I hope this is a start for you :)

                  "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups