All variables are defined.Gives me this. It's in a static class.Code:static void GetUserInput(string Text) { FormInput IForm = new FormInput(); IForm.LabelQuestion.Text = Text; IForm.ButtonAccept.Click += new EventHandler(ButtonAccept_Click); } static void ButtonAccept_Click(object sender, EventArgs e) { Button B = (Button)sender; FormInput F = (FormInput)B.FindForm(); Input = F.TextBoxAnswer.Text; F.Close(); F.Dispose(); }
Do you know why it's giving me this error?Code:An object reference is required for the non-static field, method, or property 'W4MAdvancedTweakLoaderB2.Program.Input'




Reply With Quote