• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
I RELEASE YOU! (for now .... ) Feel free to peruse this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic