Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

is it possible to achieve exclusive control of the windows desktop ?

by tos (Deacon)
on Jul 22, 2003 at 12:26 UTC ( #276690=perlquestion: print w/replies, xml ) Need Help??

tos has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

can anybody give me some hints whether one can control the windows-(XP|NT)-desktop exclusivly using perl.Is it f.i. possible to implement a screen-saver with lock function using perl/Tk- or perl/Win32-functions ?

Thanks in advance, tos

  • Comment on is it possible to achieve exclusive control of the windows desktop ?

Replies are listed 'Best First'.
Re: is it possible to achieve exclusive control of the windows desktop ?
by BrowserUk (Pope) on Jul 22, 2003 at 13:16 UTC

    Is it possible? Yes!

    Is it easy? Probably not.

    Would it be worth your while to do it?

    The answer probably depends a lot on what you want to actually achieve? Why you want to acheive it? And why you want to do it in perl?


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: is it possible to achieve exclusive control of the windows desktop ?
by halley (Prior) on Jul 22, 2003 at 16:38 UTC
    It's not clear if you want to "achieve exclusive control" or if you merely want to implement a screen saver.

    In Win32, screensavers are special executables which don't contain a regular window procedure or message loop of their own, but are handed certain filtered messages through a special window procedure. If you google for "MfcSaver" you'll get my C++ classes which wrap the Win32 concept of a screensaver. I haven't seen any script-language bindings for an equivalent program without the native window procedure.

    If you're looking to achieve exclusive control, you'll have to get more detailed: do you want to get keyboard hooks? mouse capture? GDI lockdown? Each of these should be pretty straightforward if not childs' play with the perl-Win32 API bindings, but it's an API of inclusion: by that, I mean that you have to know what you want to control before you can add support to control it. Any Windows feature your program isn't aware of, it won't be able to control. There's no "lock down everything, and let me unlock this or that," at least, none which are documented.

    --
    [ e d @ h a l l e y . c c ]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://276690]
Approved by Skeeve
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2021-10-16 01:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (69 votes). Check out past polls.

    Notices?