Link to home
Start Free TrialLog in
Avatar of matthews_30
matthews_30

asked on

is it possible to freeze and unfreeze the pc screen via visual basic?

i need to know how to freeze and unfreeze the screen, it means, that everything in the screen (all aplications) stay quiet.

is it possible via visual basic 6.0?

please i need some help on this.
Avatar of Sethi
Sethi
Flag of India image

Use LockWindowUpdate API:

Public Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long

Pass the hwnd of the window to be freezed to freeze the window:
LockWindowUpdate Me.Hwnd

Pass 0 to unfreeze the window:
LockWindowUpdate 0
Avatar of matthews_30
matthews_30

ASKER

i understand to freeze an identified window, but when you don know what window the users open, need to freeze de entire (full) screen. is this posible?
Declare a global form variable. Now whatever form a user opens set the value of that global variable to that form and pass the Hwnd of the global variable to the above method
This is not possible but if you just wanted it to look like it was frozen you could create a form that is the same size as the screen, make it always on top and bitblt the screens contents onto the form....
ASKER CERTIFIED SOLUTION
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial