Solved

stars

Posted on 2001-08-14
9
415 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
Comment Utility
set the passwordchar property to '*'.
0
 

Expert Comment

by:Shabba
Comment Utility
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
Comment Utility
Set the passwordchar property of the textbox to *

That's all..

Max.
0
 
LVL 43

Expert Comment

by:TimCottee
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:sam17
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Dang, you're fast ark :)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now