2
This is my class HotKey
    public class HotKey
{
    private string nome;
    public HotKey(string nome)
    {
        this.nome = nome;
    }
    private void Start_KeyPressed(object sender, KeyPressedEventArgs e)
    {
        Form1.StartClicked();
    }
}
And this is my class Form1
namespace Teste
{
    public partial class Form1 : Form
    {
        HotKey Start = new HotKey("start");
        public Form1()
        {
            InitializeComponent();
        }
        public void StartClicked()
        {
            MessageBox.Show("Started");
        }
    }
}
I want the function Start_KeyPressed call the function StartClicked which is at the instance of Form1
How do I do that? I’ve tried to pass the instance of Form1 as a parameter but not successful.
I’m closing the question because it turned out that she wasn’t clear at all, only the AP could answer what he wanted as an answer.
– Maniero
Actually, I think it’s clear and it might help other people...
– Alan Assis
Not only is it unclear what you’ve done is a gambit that doesn’t even have to do with the question, but I know you’ll think you’ve solved your problem, even if it’s not quite true and it’s caused you worse, but I also know there’s no point in arguing.
– Maniero
Sorry, I don’t want trouble... thanks for letting me know you’re wrong, you can close the question.
– Alan Assis
@Maniero I figured out a way to do this and I’m sure it’s not gambiarra, I can edit?
– Alan Assis