user2194683
user2194683

Reputation: 135

C# Button Shape issue

I recently tried to follow this tutorial here but I don't really understand how it works. My problem is that I don't see any button like the in the image or anything like that, there is no button on my form.

Also here is the full source code from the tutorial. I would like to know how to add the circle with the buttons on my form.

Thank you

Upvotes: 0

Views: 269

Answers (2)

Idle_Mind
Idle_Mind

Reputation: 39142

If you've added the new button class and successfully compiled, then you should have the new button called "simonButton" appearing at the TOP of your ToolBox so you can add them to your form like any other control. Change the ForeColor() property through the IDE to change the color of the button.

simonButton at the Top of the ToolBox

Upvotes: 0

gzaxx
gzaxx

Reputation: 17600

From your comment it seems that you have not added this Button to your Form.

In your Form code behind in constructor add:

public Form1()
{
     InitializeComponent();

     var btn = new simonButton(); //create button
     this.Controls.Add(btn);      //add it to form, it will be positioned in location (0,0) top-left corner
}

Upvotes: 1

Related Questions