// Windows ToolTip Örnek | www.aliakyildirim.com | Ali AKYILDIRIM
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
// Windows ToolTip Örnek | www.aliakyildirim.com | Ali AKYILDIRIM
using System.Media;
namespace UyariSistemleri
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            toolTip1.SetToolTip(textBox1, "Bu alana kullanici adinizi giriniz ");
            toolTip1.SetToolTip(textBox2, "Sifrenizi bu alana giriniz ");
        }
        private void textBox1_MouseHover(object sender, EventArgs e)
        {
            toolTip1.Show("Lütfen Kullanici Adinizi Giriniz..!", textBox1);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == string.Empty)
            {
                errorProvider1.SetError(textBox1, "Bu alani doldurunuz..!");
            }
            SoundPlayer sp = new SoundPlayer(UyariSistemleri.Properties.Resources.ok);
            sp.Play();
        }
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            errorProvider1.Clear();
            //if (textBox1.Text == string.Empty)
            //{
            // errorProvider1.SetError(textBox1, "Bu alani doldurunuz ");
            //}
        }
    }
}
// Windows ToolTip Örnek | www.aliakyildirim.com | Ali AKYILDIRIM