private void textBox2_Click(object sender, EventArgs e) { PassWordTextBox.Clear(); PassWordTextBox.ForeColor = Color.Black; if (UserNameTextBox.Text == "") { UserNameTextBox.ForeColor = Color.Gray; UserNameTextBox.Text = "Enter User Name Here"; } }
private void PassWordTextBox_Enter(object sender, EventArgs e) { PassWordTextBox.Clear(); PassWordTextBox.ForeColor = Color.Black; PassWordTextBox.UseSystemPasswordChar = true; if (UserNameTextBox.Text == "") { UserNameTextBox.ForeColor = Color.Gray; UserNameTextBox.Text = "Enter User Name Here"; } }
private void PassWordTextBox_Enter(object sender, EventArgs e)// ברגע שנכנסים לתיבה אז נמחק כל התוכן בו והכתב הופך לשחור { PassWordTextBox.Clear(); PassWordTextBox.ForeColor = Color.Black; PassWordTextBox.UseSystemPasswordChar = true; if (UserNameTextBox.Text == "") { UserNameTextBox.ForeColor = Color.Gray; UserNameTextBox.Text = "Enter User Name Here"; } }
private void textBox2_Click(object sender, EventArgs e)//אותו דבר כמו התיבה של השם משתמש { PassWordTextBox.Clear(); PassWordTextBox.ForeColor = Color.Black; PassWordTextBox.UseSystemPasswordChar = true; if (UserNameTextBox.Text == "") { UserNameTextBox.ForeColor = Color.Gray; UserNameTextBox.Text = "Enter User Name Here"; } }
private void ClearFormData() { comboBox1.SelectedIndex = -1; ServerNameComboBox.SelectedIndex = -1; DBNameComboBox.SelectedIndex = -1; NameTextBox.Clear(); PNTextBox.Clear(); LoginNamrTextBox.Clear(); UserNametextBox.Clear(); PassWordTextBox.Clear(); //radioButton1.Checked = false; //radioButton2.Checked = false; }