Click here to Skip to main content
15,900,394 members
Home / Discussions / C#
   

C#

 
AnswerRe: Close All Child Window on Menu Click! Pin
Not Active9-May-10 4:48
mentorNot Active9-May-10 4:48 
AnswerRe: Close All Child Window on Menu Click! Pin
Heinzzy9-May-10 5:47
Heinzzy9-May-10 5:47 
GeneralRe: Close All Child Window on Menu Click! Pin
Sr...Frank9-May-10 6:36
Sr...Frank9-May-10 6:36 
GeneralRe: Close All Child Window on Menu Click! Pin
Luc Pattyn9-May-10 6:41
sitebuilderLuc Pattyn9-May-10 6:41 
GeneralRe: Close All Child Window on Menu Click! Pin
Not Active9-May-10 9:48
mentorNot Active9-May-10 9:48 
Question"Search row" in DataGridView Pin
eyalbi0079-May-10 2:52
eyalbi0079-May-10 2:52 
QuestionRemote Data Acces RDA not allowed in csharp smart device,???? Pin
Tunisien869-May-10 2:05
Tunisien869-May-10 2:05 
AnswerRe: Remote Data Acces RDA not allowed in csharp smart device,???? Pin
Stanciu Vlad9-May-10 9:30
Stanciu Vlad9-May-10 9:30 
GeneralRe: Remote Data Acces RDA not allowed in csharp smart device,???? Pin
Tunisien869-May-10 10:16
Tunisien869-May-10 10:16 
GeneralRe: Remote Data Acces RDA not allowed in csharp smart device,???? Pin
Stanciu Vlad9-May-10 10:28
Stanciu Vlad9-May-10 10:28 
GeneralRe: Remote Data Acces RDA not allowed in csharp smart device,???? Pin
Tunisien869-May-10 23:55
Tunisien869-May-10 23:55 
GeneralRe: Remote Data Acces RDA not allowed in csharp smart device,???? Pin
Tunisien8611-May-10 5:57
Tunisien8611-May-10 5:57 
QuestionDataGridView and On Screen Keyboard Pin
Member 36814439-May-10 1:31
Member 36814439-May-10 1:31 
GeneralRe: DataGridView and On Screen Keyboard Pin
Arindam Tewary9-May-10 20:33
professionalArindam Tewary9-May-10 20:33 
QuestionHow to use a file .udl as a connectionstring in csharp smart device??? Pin
Tunisien869-May-10 0:13
Tunisien869-May-10 0:13 
AnswerRe: How to use a file .udl as a connectionstring in csharp smart device??? Pin
Tunisien869-May-10 1:47
Tunisien869-May-10 1:47 
Question"Raw Ethernet Packet Sending" by "miahrugger" Pin
mragers8-May-10 23:09
mragers8-May-10 23:09 
AnswerRe: "Raw Ethernet Packet Sending" by "miahrugger" Pin
OriginalGriff8-May-10 23:14
mveOriginalGriff8-May-10 23:14 
Questionwindows picture and fax viewer Pin
jojoba20118-May-10 21:22
jojoba20118-May-10 21:22 
AnswerRe: windows picture and fax viewer Pin
Dimitri Witkowski8-May-10 21:41
Dimitri Witkowski8-May-10 21:41 
RantSOLVED Pin
jojoba20118-May-10 23:35
jojoba20118-May-10 23:35 
Questionremember user name password in login form? [modified] Pin
charles henington8-May-10 19:28
charles henington8-May-10 19:28 
Hi I am writing an email program that will have a login form. when you login with the login form (Form1.cs) it will pass the username and pass word to the gmail program (Form2.cs). This is fine and works but I can not fiqure out how to get the settings.setting form to work in order to make sure that the information is remembered. right now I am using streaam reader and stream writer to read and write the username and password to Visual Studio Project User Options File. It works simply by reading from file on textBox enter and writing to on text box exit but was hoping there was a better way to do this?

Here is the code that i currently use for this
namespace Email_Client
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Email_Client.Form2 Email = new Email_Client.Form2();
            Email.User.Text = textBox1.Text.ToString();
            Email.Pass.Text = textBox2.Text.ToString();
            Email.Show();
            this.Hide();
        }

        private void textBox1_Leave(object sender, EventArgs e)
        {
            StreamWriter Writer = new StreamWriter(Application.StartupPath + "/acct/info/user.user");
            Writer.WriteLine(textBox1.Text);
            Writer.Close();
        }

        private void textBox2_Leave(object sender, EventArgs e)
        {
            StreamWriter Writer = new StreamWriter(Application.StartupPath + "/acct/info/pass.user");
            Writer.WriteLine(textBox2.Text);
            Writer.Close();
        }

        private void textBox1_Enter(object sender, EventArgs e)
        {
            if (checkBox1.Checked == true)
            {
                StreamReader userreader = new StreamReader(Application.StartupPath + "/acct/info/user.user");
                textBox1.Text = userreader.ReadToEnd();
                userreader.Close();
            }

        }

        private void textBox2_Enter(object sender, EventArgs e)
        {
            if (checkBox2.Checked == true)
            {
                StreamReader passreader = new StreamReader(Application.StartupPath + "/acct/info/pass.user");
                textBox2.Text = passreader.ReadToEnd();
                passreader.Close();

            }
        }

        internal static void DestroyHandle()
        {
            Form1.ActiveForm.Dispose();
        }
    }
}


modified on Sunday, May 9, 2010 1:35 AM

AnswerRe: remember user name password in login form? Pin
Stanciu Vlad8-May-10 20:58
Stanciu Vlad8-May-10 20:58 
QuestionSQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Tunisien868-May-10 4:58
Tunisien868-May-10 4:58 
AnswerRe: SQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Abhinav S8-May-10 5:21
Abhinav S8-May-10 5:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.