Добавьте ToolTip и задайте параметры.
Откройте окно свойств элемента управления, в котором хотите сделать подсказку и введите текст подсказки.
Form1.cs
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Windows.Forms;namespaceWindowsFormsApplication1 {-
publicpartialclassForm1 : Form { -
publicForm1() { -
InitializeComponent(); -
} -
privatevoidbutton1_Click(objectsender, EventArgs e) { -
if(textBox1.TextLength == 6 & textBox2.Text =="123456") { -
MessageBox.Show("Welcome dear "+ textBox1.Text +"!"); -
} -
else{ -
MessageBox.Show("Invalid password!"); -
} -
} -
} }
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Windows.Forms;namespaceWindowsFormsApplication1 {-
publicpartialclassForm1 : Form { -
publicForm1() { -
InitializeComponent(); -
} -
privatevoidbutton1_Click(objectsender, EventArgs e) { -
if(textBox1.TextLength == 6 & textBox2.Text =="123456") { -
MessageBox.Show("Welcome dear "+ textBox1.Text +"!"); -
} -
else{ -
MessageBox.Show("Invalid password!"); -
} -
} -
} }