?
Solved

stars

Posted on 2001-08-14
9
Medium Priority
?
456 Views
Last Modified: 2012-08-13
how can i make the words written in an inputbox to look like "stars" as in a password so nobody can see what is written
0
Comment
Question by:sam17
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 11

Expert Comment

by:Otana
ID: 6384190
set the passwordchar property to '*'.
0
 

Expert Comment

by:Shabba
ID: 6384207
On your input box, right click and select properties.  Go down until you see PasswordChar.  Put * in the field beside it.  When you type in that field, stars will appear.
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6384218
Set the passwordchar property of the textbox to *

That's all..

Max.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 43

Expert Comment

by:TimCottee
ID: 6384798
Shabba, before you spend much time here, please read the guidelines on comments vs answers at the bottom of this page. You have repeated the essence of the previous comment but have had the temerity to give it as an answer. This is in direct contravention to the guidelines given and may lead to your account being referred to customer services for possible penalty should you continue in this manner. I understand that today is your first day here so you can be excused this once. Please take the time to read the guidelines and also the comments on the expertsonly page http://www.experts-exchange.com/jsp/cmtyExpertsOnly.jsp before continuing to post answers.

Sam17, you should reject the proposed answer and choose Otana's comment as an answer, click on the button in the blue comment line next to his/her name.
0
 

Author Comment

by:sam17
ID: 6385505
i only want the password input box to be "coded"
how can i see the properties of this inputbox if i have

password = inputbox("enter password")
0
 
LVL 2

Expert Comment

by:JanusFury
ID: 6386409
What if Shabba and Otana were typing at the same time, and Otana, having a shorter post, hit 'Post' first?
Shabba didn't necessarily see the other posts when he started typing. Maybe you should cut him some slack?
0
 
LVL 2

Expert Comment

by:JanusFury
ID: 6386410
Anyway, Shabba was much more verbose, which means even the newest VB user could have understood his instructions. Not all VB newbies will understand how to set a property right off the bat. (Even though they should.)
0
 
LVL 28

Accepted Solution

by:
Ark earned 120 total points
ID: 6386676
Hi

'====Bas module code=====
Option Explicit

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Public Declare Function SetTimer& Lib "user32" (ByVal hwnd&, ByVal nIDEvent&, ByVal uElapse&, ByVal lpTimerFunc&)
Private Declare Function KillTimer& Lib "user32" (ByVal hwnd&, ByVal nIDEvent&)
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const EM_SETPASSWORDCHAR = &HCC
Public Const NV_INPUTBOX As Long = &H5000&

Public Sub TimerProc(ByVal hwnd&, ByVal uMsg&, ByVal idEvent&, ByVal dwTime&)
    Dim EditHwnd As Long
    EditHwnd = FindWindowEx(FindWindow("#32770", App.Title), 0, "Edit", "")
    Call SendMessage(EditHwnd, EM_SETPASSWORDCHAR, Asc("*"), 0)
    KillTimer hwnd, idEvent
End Sub


'=======Form code=====
Option Explicit

Private Sub Command1_Click()
  Dim ret As String
  SetTimer hwnd, NV_INPUTBOX, 10, AddressOf TimerProc
  ret = InputBox("Enter Password")
End Sub

Cheers
0
 
LVL 2

Expert Comment

by:JanusFury
ID: 6388387
Dang, you're fast ark :)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question