Rajanikant Hawaldar

Rajanikant Hawaldar

  • 31
  • 38.8k
  • 436k

Window form Locked issue

Apr 22 2019 10:50 PM
Hi All,
I created one sample Window form application and posted the full code below and problem what i am facing here is form is locked,
unable to move screen of window form using mouse cursor.
using timer is mandatory in this.
 
using System;
using System.Windows.Forms;
namespace WinScreenLocked
{
   public partial class Form1 : Form
   {
      public Form1()
      {
         InitializeComponent();
      }
      int Number = 0;
      private void timer1_Tick(object sender, EventArgs e)
      {
         while (true)
         {
            textBox1.Text = Number.ToString();
            Number++;
         }
      }
      private void button1_Click(object sender, EventArgs e)
      {
         timer1.Start();
      }
   }
}

Answers (7)