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. C#
  4. PasswordBox

PasswordBox

Scheduled Pinned Locked Moved C#
questionwpf
7 Posts 5 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.
  • T Offline
    T Offline
    The Bug
    wrote on last edited by
    #1

    Hi, all! How can I crate TextBox which would display 'circles' instead of '*' in WinXP? Currently I have TextBox with PasswordChar set to '*' because of I do not know how else I can say that this is a PasswordBox. I enabled Visual Styles through manifest but it still shows '*' Thanks. Regards, alexx.

    J M N 3 Replies Last reply
    0
    • T The Bug

      Hi, all! How can I crate TextBox which would display 'circles' instead of '*' in WinXP? Currently I have TextBox with PasswordChar set to '*' because of I do not know how else I can say that this is a PasswordBox. I enabled Visual Styles through manifest but it still shows '*' Thanks. Regards, alexx.

      J Offline
      J Offline
      JockerSoft
      wrote on last edited by
      #2

      you can use the dot character (copy and paste one of these) • ( U+0222 arial) ● ( U+25CF times new roman) or any other character in the Windows' CharactersMap (unicode section)

      T 1 Reply Last reply
      0
      • J JockerSoft

        you can use the dot character (copy and paste one of these) • ( U+0222 arial) ● ( U+25CF times new roman) or any other character in the Windows' CharactersMap (unicode section)

        T Offline
        T Offline
        The Bug
        wrote on last edited by
        #3

        Hello, Claudio! But in that case I'll got the same char in Win2k and I do not want to. Thanks. Regards, alexx

        J 1 Reply Last reply
        0
        • T The Bug

          Hi, all! How can I crate TextBox which would display 'circles' instead of '*' in WinXP? Currently I have TextBox with PasswordChar set to '*' because of I do not know how else I can say that this is a PasswordBox. I enabled Visual Styles through manifest but it still shows '*' Thanks. Regards, alexx.

          M Offline
          M Offline
          Mazdak
          wrote on last edited by
          #4

          Look for TextBox.PasswordChar property. You have to set this property. Mazy "A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope

          1 Reply Last reply
          0
          • T The Bug

            Hi, all! How can I crate TextBox which would display 'circles' instead of '*' in WinXP? Currently I have TextBox with PasswordChar set to '*' because of I do not know how else I can say that this is a PasswordBox. I enabled Visual Styles through manifest but it still shows '*' Thanks. Regards, alexx.

            N Offline
            N Offline
            Nick Parker
            wrote on last edited by
            #5

            You will have to override the CreateParams and OR the ES_PASSWORD (0x0020) to the Style. Read PasswordBox: A Better Way to Enter Passwords[^] for more details. :) - Nick Parker
              My Blog

            H 1 Reply Last reply
            0
            • N Nick Parker

              You will have to override the CreateParams and OR the ES_PASSWORD (0x0020) to the Style. Read PasswordBox: A Better Way to Enter Passwords[^] for more details. :) - Nick Parker
                My Blog

              H Offline
              H Offline
              Heath Stewart
              wrote on last edited by
              #6

              A simpler way is to set the PasswordChar property. This re-creates the handle of the TextBox with the ES_PASSWORD style.

              Microsoft MVP, Visual C# My Articles

              1 Reply Last reply
              0
              • T The Bug

                Hello, Claudio! But in that case I'll got the same char in Win2k and I do not want to. Thanks. Regards, alexx

                J Offline
                J Offline
                JockerSoft
                wrote on last edited by
                #7

                if you want to display the normal asterisk character in a Windows System < win2K you can use this: if ((Environment.OSVersion.Version.Major >= 5) || ( (Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == 4) )) { textBox1.PasswordChar= '•'; //or '●' } bye

                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