This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes General Computing and the fly likes want to disable ALT+TAB key using java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "want to disable ALT+TAB key using java" Watch "want to disable ALT+TAB key using java" New topic
Author

want to disable ALT+TAB key using java

arun singhal
Ranch Hand

Joined: Oct 25, 2009
Posts: 41
I want to disable ALT+TAB key using java. I try to disable ALT+TAB key but don't get succeed.
So Please give me some help for get out of this problem.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

Alt+Tab is handled by the operating system before it gets passed to Java, so the only option is to intercept these key events before the operating systems handles them. That could be possible through JNI, although to be honest I have no idea how.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
Too difficult for "beginning". Moving thread.
arun singhal
Ranch Hand

Joined: Oct 25, 2009
Posts: 41
I am not beginner Please give me any type of solution.So that I can get out of this problem.I am trying to disable ALT+TAB key by JNI(JAVA NATIVE INTERFACE).But Can't get succeed.Please help me.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Why are you trying to do this? You're basically saying "I am now going to break your computer."

You don't even say which OS you're trying to do this to.
arun singhal
Ranch Hand

Joined: Oct 25, 2009
Posts: 41
Sorry!!!
I am using Window 7 OS.
And I am going to tell why I want to Disable ALT+TAB key using java.....
I am making a project on CYBER CAFE MANAGEMENT in window 7 OS.
In this project When client come to cyber cafe. Then server administrator give unique username and password to client for a time limit like one hour or two hour.
Then when client use computer allotted by administrator in cyber cafe then client only can use other application after login.
And I am making LOGIN interface that have FULL SCREEN.And if Client want to close that that interface without login Then Client can not get succeed.
For that I need to disable ALT+TAB key.
Please Help me to get out of this problem...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

I think you are using the wrong hammer to hit this nail, so to speak. Have you looked into the Local Security Policy admin tool? Also, have you searched the Win32 API to locate a function that would enable you do do what you want?

Have you googled windows disable alt+tab? I just now did and found some C code that does what you are asking for.


JBoss In Action
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

arun singhal wrote:Sorry!!!
I am using Window 7 OS.
And I am going to tell why I want to Disable ALT+TAB key using java.....
I am making a project on CYBER CAFE MANAGEMENT in window 7 OS.


Then you should choose a different language. All of the key things you have to do for this cannot be done in Java. As already said, you could use JNI to do those things, but if I were grading a Java project and all of the important parts were done in some other language, I wouldn't give it a good grade at all.

Of course I may be making some incorrect assumptions about the requirements for your project.
arun singhal
Ranch Hand

Joined: Oct 25, 2009
Posts: 41
Paul Clapham wrote:
Then you should choose a different language. All of the key things you have to do for this cannot be done in Java. As already said, you could use JNI to do those things, but if I were grading a Java project and all of the important parts were done in some other language, I wouldn't give it a good grade at all.

Of course I may be making some incorrect assumptions about the requirements for your project.


Ok..
I am working on this from some days And not getting success so much.
So that now I am changing approach to Login to client.
Now i am thinking to make an application like logon screen in which unique user name and password are given to each client by server administration.
Can it is possible to make an application like logon screen like in windows logon screen???
If possible then give some idea to make this application using java.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Well, sure you can make a login screen. That's pretty trivial. But if your intention was to hack Windows so that it displayed your login screen instead of its own login screen, that's not trivial at all. Probably not even trivial if you wrote it in a Windows-specific language given the potential for security violations. And again, Java wouldn't be the language to use for hacking Windows.
arun singhal
Ranch Hand

Joined: Oct 25, 2009
Posts: 41
Paul Clapham wrote:Well, sure you can make a login screen. That's pretty trivial. But if your intention was to hack Windows so that it displayed your login screen instead of its own login screen, that's not trivial at all. Probably not even trivial if you wrote it in a Windows-specific language given the potential for security violations. And again, Java wouldn't be the language to use for hacking Windows.


No no...
I don't want to hack windows login screen.
I just want that we login in windows.After that my logon screen came .And then client can use other application after login in my own login screen.
Is it possible to make this type of login screen using java.
Please help me to get out of this problem.
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
I think I understood your requirement.
You want to provide access of computers to authorized users only.
If you don't successfully login, you can't do anything else on computer.

I don't think a Java application can't be killed so don't think in the direction that by keeping it in full screen mode you'll stop users to access other applications.
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
If you disable Alt + Tab. User can press Alt + Ctrl + Delete & kill your application.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Search the web for "kiosk mode" for Windows; it'll have more information.
akki mane
Greenhorn

Joined: Mar 29, 2011
Posts: 1
@Mr arun Singhal

I have started to work on the same login Project in JAVA

Please share with me as much info as possible........
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: want to disable ALT+TAB key using java
 
Similar Threads
Key disableing from our Application
getting character map in java
disable
Capturing/Consuming Alt+Tab combination under JFrame
how to get full control of screen through java plus some questions