Skip to main content
3 de 3
appended answer 289640 as supplemental
Math
  • 31,3mil
  • 15
  • 95
  • 132

System.NullReferenceException: 'Referência de objeto não definida para uma instância de um objeto.'

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 Market
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            Calculadora_Panel.Visible = true;
            panel3.Visible = false;
            panel4.Visible = false;
            InitializeComponent();

}

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 Market
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            Calculadora_Panel.Visible = true;
            panel3.Visible = false;
            panel4.Visible = false;
            InitializeComponent();

        }

    private void button1_Click(object sender, EventArgs e)
    {
        Form2 Calculadora = new Form2();
        Calculadora.Show();
        Calculadora_Panel.Visible = true;
        panel3.Visible = false;
        panel4.Visible = false;
    }

    private void button2_Click(object sender, EventArgs e)
    {
        Form3 PLista = new Form3();
        PLista.Show();
        Calculadora_Panel.Visible = false;
        panel3.Visible = true;
        panel4.Visible = false;
    }

    private void button3_Click(object sender, EventArgs e)
    {
        Calculadora_Panel.Visible = false;
        panel3.Visible = false;
        panel4.Visible = true;
    }

    private void button4_Click(object sender, EventArgs e)
    {
        this.Close();
    }

    private void Form1_Load(object sender, EventArgs e)
    {

    }
    void otherForm_FormClosed(object sender, FormClosedEventArgs e)
    {
        this.Show();
    }

    private void About_buttom_Click(object sender, EventArgs e)
    {
        AboutBox1 About = new AboutBox1();
        About.Show();
    }

    private void button1_Click_1(object sender, EventArgs e)
    {

    }
}

}