user7754371
user7754371

Reputation:

C# Diaglog Box/About Box

So I'm trying to make my about box appear, but it just gives me an error message of, "CS0120/An object reference is required for the non-static field, method, or property 'Form.ShowDialog()".

I created a About Box under Project/New Item and named my About box, 'About'. Super simple.

And my code for my button:

About.ShowDialog();

I mean, there shouldn't be anything else I would need?

Upvotes: 0

Views: 48

Answers (1)

Joseph Willcoxson
Joseph Willcoxson

Reputation: 6050

About about = new About();
about.ShowDialog();

Upvotes: 3

Related Questions