Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application that takes over the screen

Status
Not open for further replies.

MusaItopa

IS-IT--Management
Feb 8, 2006
18
I want to write a VB6 appication that takes control of the entire screen. t shold be such that you wont be able to use any window applications until you log on to the application
What control can i use to lock the windows App
 
The Windows system reserves the absolute control of the Windows system for itself, and doesn't allow applications to usurp that.

Suppose you went onto the internet and downloaded an application that did precisely what you describe. How would that work for you?

There's probably a better way to accomplish what you're trying to do than the solution you're contemplating. If you spend a bit of time explaining the problem rather than the solution you've come up with, maybe some of the people here can come up with improvements.

Bob
 
you wont be able to use any window applications until you log on to the application
Why not just use Windows logins?

Are you creating a kiosk application, by any chance?

 
Possibly make the login a modal form? At least something has to happen to it for it to lose focus...

Alcohol and calculus don't mix, so don't drink and derive.
 
I don't think any VB applications will run until Windows comes up. You could put your project in the start up bat or have it load automatically. All of which the user can probably change.

What are you trying to do?
 
Thanks for all the suggestions. basically i have an application that runs as EXE and not a service. The system requires logon after it has been started. it is a control application that mustnt stop or be closed. i want to control who goes into the application to change settings when running. The only possible way is for the next user to logout and login again. but this is not okay because login out will close the application. This is not my own software so i cant make changes to how it runs.

i cant use window lock screen because once another window user logs in to unlock the screen, windows will close all apps and a new profile loaded again.


So my thinking is to write an application that runs like a kiosk app which requires a logon before anyone can touch this app that i want to monitor. And when the user is done, he/she logouts out and the screen is taken over again. By this i am able to control who works on the window system ( even if he/she doesnt use my application).

I hope i made my self clear. pls i need help
 
Maybe put a small App in the Windows startup list for a special new "USER" just for accessing the protected app thus:-
Make the form that requires the log-on "always on top" and maximised and with no control boxes on the form top.
Code:
'In Declarations
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Dim Success As Integer
'in Form1 code
Private Sub Form_Load()
Success = SetWindowPos(Form1.hwnd, -1, 0, 0, 0, 0, 1) 'always on top
End Sub

Put a text window for entry of the password and 2 command buttons, 1 to accept the password and shell to the program you want to protect (change it's name if necessary to somethingelse.exe in case people know it's name and find it with Explorer).
The other "Cancel" command runs the API that closes windows (so any attempt to get around it will shut down the computer)

Code:
'declaration
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long


Sub Command1_Click()
'Accept password
If Text1.Text= "Your Password" then 'change to suit
   Success = Shell(Other Application filename)
else
   Command2_Click 'cancel
exit sub 

Sub Command2_Click()
'cancel & quit
   Call ExitWindowsEx(5, 0)
Exit Sub
 
<change it's [sic] name if necessary ...

I was thinking along similar lines as Ted. However, there is more security available for the file than changing its name. If you open the properties window for the file, there's a security tab, and you can assign whatever rights you want to whatever users and groups there are in your system.
 
I notice video sharing sites stop you from copying their temp files (any attempt says it is in use by another).
On the other hand if you pull out the power to your computer before you close the video file, it is left in the temp folder and can be shown later by renaming the .tmp to .flv - so there must be another process used to stop copying or access to the file.
It is the same for all sites so it is not exclusively the property of for example YouTube or MySpace.
There must be a way because various programs offered by third parties get around this supposed "copy protection".
Maybe the original poster to this form could use the same method if anyone knows what it is.
 
Thanks brothers, Ted's code provides the frame work for what i want to build. i am adding other contriol to the app to make it what i want.


 
One problem might be if a knowledgeable person pressed ctrl alt del and brought up the "processes" menu they might be able to shut down your form but they would still have to know the name of the application you are trying to protect. If it's shortcut is removed from the programs list and desktop and have a name that is noting to do with it's purpose, it will be hard to find.
Maybe you could call your special application explore.exe or svcghost.exe to disguise it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top