Witam.
Jestem nowy jesli chodzi o Visual Studio.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace QuizOPlanecie
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void QuizOPlanecie_Load(object sender, EventArgs e)
{
}
private void Graj_Click(object sender, EventArgs e)
{
Form2.Visible = true; //CS0120
}
}
}
Po wpisaniu tej lini kodu pokazuje błąd:"Błąd CS0120 Dla niestatycznego pola, metody lub właściwości „Control.Visible” wymagane jest odwołanie do obiektu."
Proszę o pomoc. Z góry dzięki.