Deshabilitar otro software además de Chrome

I need to write a program that forces Google Chrome to be in the front and disable all other actions like opening another program etc... I just need to have Google Chrome in front of the screen and that's all. I can't allow other programs to pop up.

Any ideas how it can be done? Thank you!

preguntado el 22 de mayo de 12 a las 18:05

You wouldn't want a program to do this - if your program is active, then by definition Chrome no lo es! I think this is going to really be a "how do I configure my PC to run this way" question. -

@Jason, you'll probably need to rephrase your question. Are you trying to escribir kisok style software? Typically that's an execution mode on a given program -

No, not a software.. I just need something that will close all other windows besides Chrome. Yes it will be used in a touch screen kiosk PC. -

3 Respuestas

Im pretty sure as far as you can get is a popup window that has no scrollbar or top bar, and can't be resized, but JS wont let you manipulate stuff outside the current window, just like you cant auto-click links inside an iframe

contestado el 22 de mayo de 12 a las 18:05

He was asking about C#, not JS - chris pfohl

I highly doubt this is possible in Windows, and if it is it won't be ethical if used on home PCs. Will this be a kiosk style app?

Usted puede control what appears in the browser to some extent, such as scrollbar-less windows but much more than that is impossible.

contestado el 22 de mayo de 12 a las 18:05

I can think of ethical situations where you might want a public kiosk style computer to , solamente allow a specific piece of software to run - chris pfohl

Yea Christopher it will be used like that. - Jason

Definitely not ethical at all but applications such as Fortress 101 can do this. I have done similar things in the past using C and the Win32 API. I won't write the code for you but I basically did the following:

  1. Find the desktop and hide it
  2. Find and hide the taskbar
  3. Find and destroy the start button
  4. Capture special keypresses and prevent them from working as expected

You would also need to poll a process list because even doing all of that doesn't prevent the user from downloading a file and executing it. Thus if you found a new application in the process list, you could destroy it.

You could do this using user32.dll with C# but such an application would better be left to commercial software packages.

contestado el 22 de mayo de 12 a las 18:05

Well at the moment it's not about ethical.. it's about kiosk. Also I really don't want to purchase anything, just write something myself. - Jason

In that case, the steps above should give you some direction. The main thing is to make everything the user shouldn't have access to inaccessible. That is pretty easy when you hide everything. The start button has to be destroyed rather than hidden because the user can use the windows key to open it if it exists at all. - amstrong

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.