Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: disable alt+tab

  1. #1
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default disable alt+tab

    I want to disable the alt+tab combination, that's, the user can't bring another application on the top instead of my application, so my application remains on the top.

    how to do that?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    Wouldn't it be better to ask the following question?

    "How do I make my application stay on top?"

    Alt+tab is not the only way to switch applications, you know...

    http://catb.org/esr/faqs/smart-questions.html
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    it's ok, how to make my application stay on top ?

    (btw. I asked the specific question to simplify my problem to gather as much as answers it can, coz a few people tried to make apps always on top, but sure, more people tried to listen to and disable events, which isn't necessarily (alt+tab) )

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    Quote Originally Posted by ahmdsd_ostora View Post
    it's ok, how to make my application stay on top ?
    Set a Qt::WindowStaysOnTopHint flag on your window. Setting the window to full screen mode might be helpful too.

    (btw. I asked the specific question to simplify my problem to gather as much as answers it can, coz a few people tried to make apps always on top, but sure, more people tried to listen to and disable events, which isn't necessarily (alt+tab) )
    Asking about alt+tab does not simplify your problem. The fact that you know a solution that does "more or less what you want" doesn't make your actual problem any simpler.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: disable alt+tab

    Note, also, that giving a hint for a window to stay on top won't always work; such behavior is dependent on the underlying window manager, and not all of them support such things.

    Note too that an application that can't be gotten out of the way has the potential to be incredibly annoying to many users. Think very hard about whether you want to pursue this approach; it runs counter to most UI guidelines.

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    Secondly, on Windows XP and above, pressing the "Windows Key" will automatically remove your applications "stay on top" flag and allow access to the task bar and start menu. On Windows 7 you can also forcibly resize any application to stop it hogging the entire desktop by using the task bar.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    In other words, install an X11 system and run your app without a window manager And seriously what we are looking for here is 'kiosk mode'.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    In another topic where he asks more or less the same question (topic:"Lock screen") his target OS is Windows, so I don't think he wants to install X11

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    If he wants to annex the whole system for his app, then what difference does the OS make?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #10
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    How he's going, he's going to need a system level driver to hook into the input stream and prevent certain events from reaching the OS, so he'll need to decide on an OS first. Unless of course he decides to rewrite the BIOS and stop everything there

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    And certainly the whole topic is out of scope of this forum...
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. #12
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    Indeed. I've tried to push him in the right direction, but maybe he doesn't like doing research.

  13. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    So I've seen...
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  14. #14
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    mmm, so .. alot of discussions here
    and the result that you all agreed is that I am fool

    ok, let's ask a shorter (encapsulated) question:
    I want a method that pushes my application on the top of all applications when it's called any time .. just it, and I will use it to achieve my goal by quick periodical calls.

  15. #15
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    If you do that, you risk that the first thing your users will do after launching your program will be to quit and uninstall it. Especially that you'll be wasting CPU power (besides the app being annoying). What is the point of what you are doing?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  16. #16
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    Quote Originally Posted by SixDegrees View Post
    Note too that an application that can't be gotten out of the way has the potential to be incredibly annoying to many users. Think very hard about whether you want to pursue this approach; it runs counter to most UI guidelines.
    The user will be pleased if this feature succeeds. It's a lock screen, friend.


    Quote Originally Posted by wysota View Post
    Set a Qt::WindowStaysOnTopHint flag on your window. Setting the window to full screen mode might be helpful too.
    This flag is working unless the OS forced the application to be behind. It cannot be used here.

    Quote Originally Posted by fatjuicymole View Post
    Indeed. I've tried to push him in the right direction, but maybe he doesn't like doing research.
    1- immitating a screen saver will not allow me to add a password edit field, I found an action that runs a secured screen saver but it doesn't work on xp .
    2- This requires admin access.
    3- will break the portabily even if my current target is Windows.

  17. #17
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    Quote Originally Posted by wysota View Post
    If you do that, you risk that the first thing your users will do after launching your program will be to quit and uninstall it. Especially that you'll be wasting CPU power (besides the app being annoying). What is the point of what you are doing?
    It's a lock screen that prevents access to the PC at certain times, mainly targets kids.
    btw. the kid will not be able to exit the application.

  18. #18
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    Quote Originally Posted by ahmdsd_ostora View Post
    the kid will not be able to exit the application.
    What if he presses Ctl+Alt+Del and kills the application from within the task manager? Or... reboots the computer?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  19. #19
    Join Date
    Jun 2010
    Posts
    86
    Thanks
    10
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: disable alt+tab

    Quote Originally Posted by wysota View Post
    What if he presses Ctl+Alt+Del and kills the application from within the task manager? Or... reboots the computer?
    1- if he clicked Ctl+Alt+Del , my application will quickly get over the task manager, and prevents him from even seeing the processes list,
    2- if he reboots the computer, my application should run on the start-up and check the time, and lock the screen if it's not an allowed time.

  20. #20
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: disable alt+tab

    It's all an arcade, I'm sure the kid will be able to find a way to use the task manager. As for the second step each autostart entry can be disabled prior to your application launching. Not forgetting that it can simply be killed before the deadline comes and the screen is "locked". Why can't you use regular parental control facilities (be it built into the system or provided by a 3rd party)?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. How to disable enter
    By phillip_Qt in forum Qt Programming
    Replies: 11
    Last Post: 23rd August 2012, 07:52
  2. How to disable ALT + F4
    By elizabeth.h1 in forum Qt Programming
    Replies: 19
    Last Post: 22nd June 2010, 22:05
  3. How to disable keyboard
    By garry_3peace in forum Newbie
    Replies: 9
    Last Post: 27th October 2009, 04:17
  4. how to disable Alt F4 combination
    By omprakash in forum Qt Programming
    Replies: 3
    Last Post: 17th August 2008, 20:18
  5. Disable Tab Key
    By otortos in forum Newbie
    Replies: 6
    Last Post: 25th March 2006, 16:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.