Couple Of Easy Questions

Alright First Question:

I Made a list box with user names in it, and i was wondering how when the user double-clicks their name how to make it ask for a password and it loads their information, like they double clik and it says password and they type their password then their ex. datagrid with their information pop-up! How do i make this happen

Ill ask second question after first is answered! Thanks

 

* edit- shucks i did it again, can someone please move my post to the visual c# 2005 forum section, i thought i was already in it! Sorry!



Answer this question

Couple Of Easy Questions

  • MiguelSilva

    hi,

    i didn't understand your first question well , why do you want to ask about password when you don't know it

    regarding to your second question you can add to the example

    PasswordDialog.Text = "Please Enter Your Password!";

    hope this helps



  • Chante

    Hi,

    Is your problem solved If no then can you be clear in your problem definition

    Thank you,
    Bhanu.



  • m0gb0y74

    Moving... :)



  • Len Aye

    yes but....now how do i change the password I ran it and cant get it off becuase i dont know my password! How do i change it

     

    and how do i get the top of the box to say Please Enter Your Password!


  • Sathya E

    Buddy Funny wrote:

    Alright First Question:

    I Made a list box with user names in it, and i was wondering how when the user double-clicks their name how to make it ask for a password and it loads their information, like they double clik and it says password and they type their password then their ex. datagrid with their information pop-up! How do i make this happen

    If you added the event (go to properties for the listbox, click the lightning icon and doubleclick 'MouseDoubleClick') you could use something like this to pop a password box:

    Form PasswordDialog = new Form();

    TextBox PasswordBox = new TextBox();

    Button OKButton = new Button();

    PasswordDialog.FormBorderStyle = FormBorderStyle.FixedDialog;

    PasswordDialog.MaximizeBox = false;

    PasswordDialog.MinimizeBox = false;

    PasswordDialog.AutoSize = true;

    PasswordDialog.AutoSizeMode = AutoSizeMode.GrowAndShrink;

    PasswordDialog.AcceptButton = OKButton;

    OKButton.Text = "OK";

    OKButton.DialogResult = DialogResult.OK;

    PasswordBox.PasswordChar = '*';

    PasswordDialog.Controls.Add(PasswordBox);

    PasswordDialog.Controls.Add(OKButton);

    PasswordBox.Location = new Point(5, 5);

    OKButton.Location = new Point(PasswordBox.Width + 10, 5);

    PasswordDialog.ShowDialog(this);

    if (PasswordDialog.DialogResult == DialogResult.OK)

    {

    //do something with PasswordBox.Text

    }

    PasswordDialog = null;

    Is that what you are wanting



  • Jason D_dot_NET

    Well i done the data grid and everything but i want when the program starts a box pops-up and says select user name and then you double click and then you have to type your password! That's where im stuck.
  • Tommy Upton

    Which part of the problem are you stuck on Do you know how to show a control where the user can enter the password Can you retrieve the data and populate a datagrid



  • Couple Of Easy Questions