Hmmm, abis Tanya mbah google dapat ini mas siapa tahu bisa membantu , jadi
bikin dulu module sbb :
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 WindowTitle As String
Public Sub TimerProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal idEvent
As Long, ByVal dwTime As Long)
Dim EditHwnd As Long
EditHwnd = FindWindowEx(FindWindow("#32770", WindowTitle),
0, "Edit", "")
Call SendMessage(EditHwnd, EM_SETPASSWORDCHAR, Asc("*"), 0)
KillTimer hwnd, idEvent
End Sub
Public Function PasswordInputbox(Prompt As String, Optional Title As
String, Optional Default As String, Optional XPos As Long, Optional YPos
As Long, Optional HelpFile As Long, Optional Context As Long) As String
Dim ret As String
If Title = "" Then
WindowTitle = App.Title
Else
WindowTitle = Title
End If
SetTimer 0, 0, 1, AddressOf TimerProc
PasswordInputbox = InputBox(Prompt, WindowTitle, Default, XPos, YPos,
HelpFile, Context)
End Function
Kemudian panggil dr form contohnya seperti ini :
Private Sub Command1_Click()
Dim a
a = PasswordInputbox("Enter Text", "Title")
End Sub
Semoga membantu mas, kalo jalan kabari kita2 di forum ini ya mas, matur nuwun
Kl menurut saya sih lebih enak bikin satu form aja yg kecil dan ada satu text
box jadi menyerupai inputbox trus di set password formatnya hehehehe
From: [email protected] [mailto:[email protected]] On
Behalf Of Heru Wibowo
Sent: Friday, August 21, 2009 8:45 PM
To: [email protected]
Subject: FW: [belajar-access] InputBox Format
Waduh...kayaknya koq tidak ada yang menanggapi lebih lanjut lagi permasalahan
saya ini ya ????
Heru Wibowo
From: Heru Wibowo [mailto:[email protected]]
Sent: 18 Agustus 2009 21:54
To: '[email protected]'
Subject: RE: [belajar-access] InputBox Format
Maaf...mungkin pertanyaan saya yang kurang spesifik...yang saya maksudkan di
sini adalah pada kotak dialog InputBox, bukan pada karakter text box, jadi
sewaktu InputBox aktif, pada waktu memasukkan karakter akan berubah menjadi
*****
contoh : TxPassUnlock = InputBox("Pasword Unlock :", "Password Unlock")
Salam,
Heru Wibowo
From: [email protected] [mailto:[email protected]] On
Behalf Of sri widayati
Sent: 18 Agustus 2009 8:12
To: [email protected]
Subject: Re: [belajar-access] InputBox Format
Pada properties, Input Mask diganti/dipilih format password.
Best regrads,
Sri Widayati
Hp 081328037179
_____
From: Heru Wibowo <[email protected]>
To: [email protected]
Sent: Monday, August 17, 2009 2:51:08 PM
Subject: [belajar-access] InputBox Format
Dear All,
Mohon bantuan solusinya... bagaimana ya caranya membuat agar input box memiliki
format seperti password ( karakter *****)
Thank’s atas solusinya
Heru Wibowo
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.58/2309 - Release Date: 08/17/09
06:08:00