Solved

stars

Posted on 2001-08-14
9
435 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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 27

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

808 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