Solved

stars

Posted on 2001-08-14
9
442 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
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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 30 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

809 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