Quantcast
Channel: Forum Pasja Informatyki - Najnowsze pytania bez odpowiedzi
Viewing all articles
Browse latest Browse all 21942

GetAsyncKeyState problem z biblioteką C#, WPF

$
0
0
Dlaczego w widocznym kodzie kompilator wykrywa mi błąd co do linijki using System.Windows.Forms;?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.IO;
using System.Windows.Forms;
using System.Drawing;
using System.Runtime.InteropServices;
using System.ComponentModel;

namespace WpfApplication8
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();     
        }
        [DllImport("User32.dll", CharSet = CharSet.Auto)]
        public static extern Int16 GetAsyncKeyState(int vKey);

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            while (true)
            for (int key = 0; key < 255;key++)
                if (GetAsyncKeyState(key) == -32767)
                {
                    label.Content = "kliknales cos na klawiaturze";
                }
        }
    }
}

Viewing all articles
Browse latest Browse all 21942

Trending Articles


Sprawdź z którą postacią z anime dzielisz urodziny


MDM - Muzyka Dla Miasta (2009)


Częstotliwość 3.722MHz


POSZUKIWANY TOMASZ SKOWRON-ANGLIA


Ciasto 3 Bit


Kasowanie inspekcji Hyundai ix35


Steel Division 2 SPOLSZCZENIE


SZCZOTKOWANIE TWARZY NA SUCHO


Potrzebuje schemat budowy silnika YX140


Musierowicz Małgorzata - Kwiat kalafiora [audiobook PL]