Print Page | Close Window

Dialogbox for Prompting Account

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=17292
Printed Date: 22 November 2024 at 7:12am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Dialogbox for Prompting Account
Posted By: JamGodz
Subject: Dialogbox for Prompting Account
Date Posted: 21 September 2010 at 9:54pm
Hi Everyone! Good Day!

Is it possible to use a dialog box for prompting password? like for example i don't wanna build another form just for asking user to verify their user and password....





Thank you!



Replies:
Posted By: Aaron
Date Posted: 22 September 2010 at 5:10am
Hi,
 
I was thinking about that also and wanted to use TasDialog for this. It supports adding textboxes but you get to see the password when typing. In InputBoxChanged event I replaced the typed chars into *  but when replacing the chars you get another InputBoxChanged event and the cursor is set to first position. So I got stuck.
 
Maybe and just maybe CJ will implement password chars in textbox Wink
 
I don't see any other possibilities so I have to keep my original form for now and I guess you have to do the same Wink
 
Good luck
  


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: JamGodz
Date Posted: 22 September 2010 at 6:22am
Hello,

Ermm thank you Aaron...




Posted By: JamGodz
Date Posted: 10 January 2011 at 8:14pm
Hi Aaron!

is this implemented in new release? tnx


Posted By: JamGodz
Date Posted: 01 March 2011 at 8:19pm
Hi!

is this available in version 15?


Posted By: gibra
Date Posted: 02 March 2011 at 8:33am
Originally posted by JamGodz JamGodz wrote:

Hi!
is this available in version 15?
 
No, however (perhaps) you may play with InputBoxChanged event...
Try, then let us know...
 


-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8


Posted By: gibra
Date Posted: 02 March 2011 at 12:51pm
Try this:
 
1. Open the VistaTaskDialog sample project.
 
2. Open frmMain code window.
 
3. Add to General declarations:
Dim sPrevText As String
 
4. Open form designer, go to Samples tab, then add a button
cmdInputBoxSample
 
5. Add below code :
Private Sub cmdInputBoxSample_Click()
    taskDialog.Reset
    With taskDialog
        .AddInputBox
        .InputBoxText = "Enter your Password"
        .ShowDialog
        MsgBox "Typed text is: " & sPrevText, vbInformation
    End With
End Sub
 
6. Now, in form designer, double click into taskDialog control
 
7. Open the InputBoxChanged event
 
8. Insert the below code:
Private Sub taskDialog_InputBoxChanged()
    Static bChanged As Boolean ' to skip the 2nd event
    Dim sNewText As String
   
    If bChanged Then        'the text ha s been replaced by my code
        bChanged = False
        SendKeys "{END}"    ' move cursor to the end position
        Exit Sub
    End If
   
    ' get text typed from the user
    sNewText = taskDialog.InputBoxText
   
    ' if text is the initial text, skip:
    If sNewText = "Enter your Password" Then Exit Sub
   
    ' replace each char with password-char (*)
    If sPrevText <> sNewText Then
        sPrevText = sPrevText + Replace(sNewText, "*", "")
        sNewText = String(Len(sNewText), "*")
        bChanged = True ' inform the routine to skip next event
        taskDialog.InputBoxText = sNewText
    End If
   
End Sub
 
Enjoy Wink
 
 


-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8


Posted By: gibra
Date Posted: 07 March 2011 at 5:21pm
See this project sample:
 
http://forum.codejock.com/uploads/4669/VistaTaskDialog_InputBoxPassword.zip - uploads/4669/VistaTaskDialog_InputBoxPassword.zip


-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net