Witam. Mam problem z Windows Forms w środowisku VS 2008 Professional. Otóż tworzyłem aplikacje Windows Forms i wszystko działało, a tu nagle nie mogę stworzyć żadnego okienka i dostaję błąd : " InitializeComponent does not exist in the current context " i taki sam błąd dla najprostszego richTextBox. Dlaczego tak się dzieje i jak mogę to naprawić? Wklejam jeszcze swój kod :
(Oczywiście dodałem richTextBoxa)
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace sts
{
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form
{
int a = 0;
string b;
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
while (true)
{
if (a < 500)
{
a = a + 1;
b = Convert.ToString(a);
richTextBox1.Text = b;
}
}
}
}
}