Paneli Insert tuşuyla kapatmak

AsafOzan

Hectopat
Katılım
31 Ocak 2020
Mesajlar
206
Çözümler
1
Hatam nerede yardim eder misiniz acemiyim. Yapmak istedigim insert tuşuyla paneli kapatmak.

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;
Using System. Threading;
Using System. Runtime. Interopservices;

Namespace deniyoz_bisiler.
{
Public partial class form1: Form.
{
[DllImport("user32.dll;")]
Static extern short getasynckeystate(keys vkey);

Static bool showing = true;

Public Form1()
{
InitializeComponent();

//Make the Windows transparent.
This. Backcolor = color. Wheat;
This. Transparencykey = color. Wheat;

//Make the Windows borderless.
This. Formborderstyle = formborderstyle. None;

//Make the Windows start in top left corner.
This. Startposition = formstartposition. Manual;

//Make the Windows topmost.
This. Topmost = true;

Checkforıllegalcrossthreadcalls = false;

Thread shm = New thread(showhidemenu);
shm.Start();
}

Void ShowHideMenu()
{
While (true)
{
İf (getasynckeystate(keys. Insert) < 0 && showing == true) //than hide it.
{
this.Hide();
Showing = false;
Thread. Sleep(20);
}
Else if (getasynckeystate(keys. Insert) < 0 && showing == false) // than show it.
{
this.Show();
Showing = true;
Thread. Sleep(20);
}
Else if (getasynckeystate(keys. Delete) < 0)
{
Environment. Exit(0);
Application.Exit();
}
Thread. Sleep(70);
}
}
}

Private Void label1_click(object sender, eventargs e)
{
//End all created threads.
Environment. Exit(0);
Application.Exit();
}
}
}
 
Hatamı veriyor biraz açıklar mısın?
En alt kısmı şeklinde değiştirdim şimdi 1 tane hata veriyor hata şu "KOD CS0116 AD ALANI; ALANLAR, YÖNTEMLER VEYA DEYİMLER GİBİ ÜYELERİ DOĞRUDAN İÇERMEZ"
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
//end all created threads
Environment.Exit(0);
Application.Exit();
}
}
 

Geri
Yukarı