Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Kako da uhvatim kombinaciju dugmadi sa tastaturte (npr. CTRL+ALT+DEL)

[es] :: .NET :: Kako da uhvatim kombinaciju dugmadi sa tastaturte (npr. CTRL+ALT+DEL)

[ Pregleda: 533 | Odgovora: 7 ]

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Mikelly

Član broj: 16730
Poruke: 240
77.222.2.*



Profil

icon Kako da uhvatim kombinaciju dugmadi sa tastaturte (npr. CTRL+ALT+DEL)15.04.2008. u 11:11

Naslov teme je dovoljan. Kako hvatam kombinaciju tastera?

Pozdrav i hvala.
15.04.2008. u 11:11 

mmix
Miljan Mitrovic
Software Architect
Pancevo, Srbija

Moderator
Član broj: 17944
Poruke: 1607
195.252.78.*



Profil

icon Re: Kako da uhvatim kombinaciju dugmadi sa tastaturte (npr. CTRL+ALT+DEL)15.04.2008. u 14:01
Ta kombinacija za koju si se uhvatio je nedostupna, ne postoji nacina da presretnes Ctrl-Alt-Del od Windows NT-a na ovamo (sem da sam pises svoj GIna modul sto je malo zesci overkill).
▪ The word 'politics' is derived from the word 'poly', meaning 'many', and the word 'ticks', meaning 'blood sucking parasites' - Larry Hardiman
▪ If the good guy gets the girl, it's rated PG; if the bad guy gets the girl, it's rated R; and if everybody gets the girl, it's rated X
▪ Illegal aliens have always been a problem in the United States. Ask any Native American
15.04.2008. u 14:01 

Shadowed
.NET developer

SuperModerator
Član broj: 649
Poruke: 8669
*.static.sbb.rs.

Sajt: www.diskusije.net


Profil

icon Re: Kako da uhvatim kombinaciju dugmadi sa tastaturte (npr. CTRL+ALT+DEL)15.04.2008. u 14:11
Mislim da bi moglo i sa driver-om za tastaturu :)
15.04.2008. u 14:11 

Mikelly

Član broj: 16730
Poruke: 240
77.222.11.*



Profil

icon Re: Kako da uhvatim kombinaciju dugmadi sa tastaturte (npr. CTRL+ALT+DEL)16.04.2008. u 08:22
Ja navedoh tu kombinaciju kao primjer, kako cu uhvatit neku drugu. Recimo CTRL+F8?
16.04.2008. u 08:22 

mmix
Miljan Mitrovic
Software Architect
Pancevo, Srbija

Moderator
Član broj: 17944
Poruke: 1607
195.252.78.*



Profil

icon Re: Kako da uhvatim kombinaciju dugmadi sa tastaturte (npr. CTRL+ALT+DEL)16.04.2008. u 08:37
Onda ima jos jedno pitanje na koje trebamo odgovor, da li kombinacije hvatas dok ti je aplikacija u fokusu ili hoces da hvatas na nivou celog OS-a?


▪ The word 'politics' is derived from the word 'poly', meaning 'many', and the word 'ticks', meaning 'blood sucking parasites' - Larry Hardiman
▪ If the good guy gets the girl, it's rated PG; if the bad guy gets the girl, it's rated R; and if everybody gets the girl, it's rated X
▪ Illegal aliens have always been a problem in the United States. Ask any Native American
16.04.2008. u 08:37 

Mikelly

Član broj: 16730
Poruke: 240
77.222.11.*



Profil

icon Re: Kako da uhvatim kombinaciju dugmadi sa tastaturte (npr. CTRL+ALT+DEL)16.04.2008. u 14:49
Dok je aplikacija u fokusu.

Konkretno hocu da "toggle"-ujem jednu kontrolu visible/not visible jednom kombinacijom tastera.

16.04.2008. u 14:49 

mmix
Miljan Mitrovic
Software Architect
Pancevo, Srbija

Moderator
Član broj: 17944
Poruke: 1607
195.252.78.*



Profil

icon Re: Kako da uhvatim kombinaciju dugmadi sa tastaturte (npr. CTRL+ALT+DEL)16.04.2008. u 15:40
Na nivou forme uhvatis KeyDown event. Sledeci primer togluje textbox visibility na Ctrl-Alt-S, ti prilagodi za svoju primenu

Code:

        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Control & e.Alt & e.KeyValue == 'S')
            {
                textBox1.Visible = !textBox1.Visible;
                e.Handled = true;  // ovo samo ako hoces da key code ne ide dalje u kontrole.
            }
        }

▪ The word 'politics' is derived from the word 'poly', meaning 'many', and the word 'ticks', meaning 'blood sucking parasites' - Larry Hardiman
▪ If the good guy gets the girl, it's rated PG; if the bad guy gets the girl, it's rated R; and if everybody gets the girl, it's rated X
▪ Illegal aliens have always been a problem in the United States. Ask any Native American
16.04.2008. u 15:40 

Shadowed
.NET developer

SuperModerator
Član broj: 649
Poruke: 8669
*.static.sbb.rs.

Sajt: www.diskusije.net


Profil

icon Re: Kako da uhvatim kombinaciju dugmadi sa tastaturte (npr. CTRL+ALT+DEL)16.04.2008. u 15:46
Samo prethodno postavi KeyPreview property forme na true.
16.04.2008. u 15:46 

[es] :: .NET :: Kako da uhvatim kombinaciju dugmadi sa tastaturte (npr. CTRL+ALT+DEL)

[ Pregleda: 533 | Odgovora: 7 ]

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.