none
ERREUR le nom ' GetAsyncKeyState ' n'existe pas dans le contexte actuel RRS feed

  • Question

  • svp j'aurais besoin dans un code en C# j'essaye de faire mon spammeur et j'essaye de placé cela dans un de mes timers: GetAsyncKeyState et cela quand j'essaye de debloguer la solution m'affiche cela: le nom ' GetAsyncKeyState ' n'existe pas dans le contexte actuel, voila mon code:

    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 WindowsFormsApplication5
    {
        public partial class Form1 : Form
        {

            public Form1()
            {
                InitializeComponent();
            }

            private void Form1_Load(object sender, EventArgs e)
            {

            }

            private void button1_Click(object sender, EventArgs e)
            {
                SendKeys.Send(":medicament doliprane");
                SendKeys.Send("{ENTER}");
            }

            private void timer1_Tick(object sender, EventArgs e)
            {
                bool hotkey = false;
                hotkey = GetAsyncKeyState(Keys.F1);
                if (hotkey == true)
                    button1.PerformClick();
                }
            }
        }
    }

    mercredi 15 juillet 2015 05:28

Réponses

Toutes les réponses