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";
}
}
}
}
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";
}
}
}
}