Board index » delphi » Taking over the whole screen.

Taking over the whole screen.

Is there a simple way in Delphi to take control of the entire screen,
effectively locking out other apps, and then allow direct drawing and
manipulations of the screen ?

I could create a captionless, borderless form, set to full screen, but
it would then still be just drawing on a form. I'm wondering if
there's any way of speeding up the drawing, by not requiring other
apps to re-draw ?

 

Re:Taking over the whole screen.


Quote
ca...@larouss.demon.co.uk (Casey Charlton) writes:
> Is there a simple way in Delphi to take control of the entire screen,
> effectively locking out other apps, and then allow direct drawing and
> manipulations of the screen ?

> I could create a captionless, borderless form, set to full screen, but
> it would then still be just drawing on a form. I'm wondering if
> there's any way of speeding up the drawing, by not requiring other
> apps to re-draw ?

DON'T DO IT!  People will want a way out of such apps if it gets stuck, or if
they want to pause and do something else without needing to exit the app.

Regards,
Don.

Re:Taking over the whole screen.


Quote
dbeu...@us.oracle.com (Don Beusee) wrote:
>ca...@larouss.demon.co.uk (Casey Charlton) writes:
>> Is there a simple way in Delphi to take control of the entire screen,
>> effectively locking out other apps, and then allow direct drawing and
>> manipulations of the screen ?
>DON'T DO IT!  People will want a way out of such apps if it gets stuck, or if
>they want to pause and do something else without needing to exit the app.

       I dislike the idea as a general approach, but it is required in
some circumstances (Audit security requirements, etc). You 1st make
the  Window full-screen, then use a WinAPI call to SetWindowPos() with
the flag set to HWND_TOPMOST. You'll need to get the parameters from
Help. Call it again with HWND_NOTOPMOST to undo the damage.

        If you're doing this for security reasons, then you have many
other areas you need to consider - mainly any app can call
SetWindowPos() and un-topmost your window. If you're doing it just as
part of your program design...

Quote
>DON'T DO IT!  People will want a way out of such apps if it gets stuck...

        and he's right.

JHus

Re:Taking over the whole screen.


In article <808561211.14...@larouss.demon.co.uk>,
ca...@larouss.demon.co.uk says...

Quote

>Is there a simple way in Delphi to take control of the entire screen,
>effectively locking out other apps, and then allow direct drawing and
>manipulations of the screen ?

>I could create a captionless, borderless form, set to full screen, but
>it would then still be just drawing on a form. I'm wondering if
>there's any way of speeding up the drawing, by not requiring other
>apps to re-draw ?

Using Windows API calls with a device context = NULL draws directly on
the screen image.  (By the way, this is a documented feature, not merely
one of my many kludges. <g>).

Todd

--
=====================================================
Todd Fast (that's right...just like the adjective)    tf...@eden.com
"His mind is somewhat too much taken up with his mind." - John Earle
=====================================================

Re:Taking over the whole screen.


Quote
>         I dislike the idea as a general approach, but it is required in
>  some circumstances (Audit security requirements, etc). You 1st make
>  the  Window full-screen, then use a WinAPI call to SetWindowPos() with
>  the flag set to HWND_TOPMOST. You'll need to get the parameters from
>  Help. Call it again with HWND_NOTOPMOST to undo the damage.

Let me add a Delphi specific...Set the form's FormStyle (??) to [fsStayOnTop] instead
and dispense with the API...then if for some reason Win95 doesn't support the call in
the same way, you don't have to change anything.

John

-----------------------------------------------------------------------------
John Reynolds                          Contact me for free demo
Custom Windows Programming [tm]        Delphi Visual Components
Delphi/VB/C++                          Device-Independence Control
(505) 836-1384/264-0708                Other GUI and ease-of-programming helps
jre...@rt66.com (CIS: 71154,537)       Programming Completely Optional [tm]

Re:Taking over the whole screen.


Quote
>>DON'T DO IT!  People will want a way out of such apps if it gets stuck, or if
>>they want to pause and do something else without needing to exit the app.

Sorry, but much as I like Windows GUI, I don't neccessarily want it
popping itself up at unexpected moments. Take a look at almost ANY
multimedia CD-Rom to see a program that takes over the whole screen.

====================================================================
= Casey Charlton            = 'Actions speak louder than words,    =
= ca...@larouss.demon.co.uk =  grenades speak louder than actions' =
====================================================================

Other Threads