B M

B M

  • NA
  • 1
  • 2.7k

Simple question: button click to call additional method

Sep 26 2010 2:09 PM
A starter story here: I want a button click to call my method (located in the same class). I created button using IDE, created a button1_click event and a Method (DrawString) to be called. However, the method is not called- I feel really stupid, but I can't find the solutions...

public void button1_Click(object sender, EventArgs e)

        {

            Form1 f1 = new Form1();

            f1.DrawString();

        }


All the rest is as generated by the IDE. 

The button click works fine, but it does not call DrawString () method. 

 

Answers (2)