1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Program to monitor my laptop's lid being closed

Discussion in 'Software Development' started by metomeya, Sep 23, 2004.

Thread Status:
Not open for further replies.
  1. metomeya

    metomeya Thread Starter

    Joined:
    Sep 23, 2004
    Messages:
    6
    Okay here goes

    I'm not a programmer, but I was wondering if it would be possible to write a little background program that would put my computer to lockdown when I closed the lid on my laptop computer?

    Here is the command i wanted executed.

    rundll32 user32.dll LockWorkStation



    Note: Before anyone gives other options I do not want to use standby, hibernate, screen savers passwords, or the win + L. And the option isn't under window's power control options.

    ------------------------------------------------------------------------

    This is the information I've gotten so far. If you check out this link

    http://msdn.microsoft.com/library/d..._db841434-fe00-448d-b5bb-2c35d1ad0ec4.xml.asp

    It talks about detecting when a computer is closed or open - "PO_CB_LID_SWITCH_STATE − Indicates that the lid switch has changed states." But is this in C or visual basic or something?

    Finally my friend has posted this

    "Basically, it looks like the event is available at the driver level, but not at the application level. So you have to write a driver to capture this callback, then pass it along, somehow, to an application which will do what you want. "

    :confused: :confused: :confused: :confused:
     
  2. metomeya

    metomeya Thread Starter

    Joined:
    Sep 23, 2004
    Messages:
    6
    No replies uh?
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/277100

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice