• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Key disableing from our Application

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I have a application which is developed usng JEC Swing There is a Frame which is opened with Login Oprion.
i want to disable all the Keys other then some Char & Numaric) when this frame is opened.
Example:
When i boot the system i will open My Applcation after that user should able to open any applications fromn Desktop..like if he press start menu key,F1...F2...some thing like this.
can i do this ? pls let me know how can i achive this through Event OR some other way..
Thanks in Advace
Viswa
======
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, viswagb, please re-register with a username following the JavaRanch UserName Guidelines. Your username has to be in the format "First Name" + space + "Last Name".

It sounds like you want to disable all keys when your login screen comes up, not allowing the user to use alt-tab to switch to another program, or Ctrl-C to kill it, or windows key to bring up menu. This isn't possible because Windows catches system keypresses like Ctrl-C, Alt-Tab, and windows key first and deals with them. There is no way a pure Java program can interrupt the OS from getting these key presses. (There may be able to be some way to use JNI to do this, but I don't know how to do it...)

-Nate
 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic