Form3.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace WindowsFormsApp19
  11. {
  12. public partial class Form3 : Form
  13. {
  14. public Form3()
  15. {
  16. InitializeComponent();
  17. AutoCompleteStringCollection source = new AutoCompleteStringCollection()
  18. {
  19. "Кузнецов",
  20. "Иванов",
  21. "Петров",
  22. "Кустов"
  23. };
  24. textBox2.AutoCompleteCustomSource = source;
  25. textBox2.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
  26. textBox2.AutoCompleteSource = AutoCompleteSource.CustomSource;
  27. textBox3.TextChanged += textBox3_TextChanged;
  28. }
  29. private void Form3_Load(object sender, EventArgs e)
  30. {
  31. }
  32. private void textBox2_TextChanged(object sender, EventArgs e)
  33. {
  34. }
  35. private void textBox3_TextChanged(object sender, EventArgs e)
  36. {
  37. label3.Text = textBox3.Text;
  38. }
  39. private void button1_Click(object sender, EventArgs e)
  40. {
  41. Form4 frm4 = new Form4();
  42. frm4.Show();
  43. }
  44. }
  45. }