Results 1 to 5 of 5

Thread: Blocking The Screen

  1. #1

    Thread Starter
    Fanatic Member eimroda's Avatar
    Join Date
    Jul 2000
    Location
    Philippines
    Posts
    642

    Blocking The Screen

    I have a business where I lend computers to customers for a certain amount for a specified number of hours. Mostly, customers rented my computers for gaming (Counter Strike, Quake 3....). I am maintaining 15 computers manually and I found it hard to keep track on the usage of the computers. What I want is that I'll make a program that is going to block the screen after the specified time (No. of minutes/hours) automatically, thus preventing the user to continue using the computer if his time is up. I created a program with such purpose by using the SetWindowPos API. I was successful when the user is only using windows apps. such as MS Office or the internet. But in terms of games, when it attempted to block the screen, all I get is a blinking screen and the game application prevailed. Is there any other API to use to solve this problem or is there any free program with such purpose whcih I can download?
    On Error GoTo Hell

    Hell:
    Kill Me


    Food For Thought:

    - Do not judge a book... if you're not a judge!


  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    DirectX and OpenGL (the APIs used in games) take over the screen real-estate when running. This means that only they can take up the screen. I suggest using Directdraw in fullscreen mode for the same purpose. That way since your program runs first, no other program can go on top of it.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    If you show a message box (or inputbox for a password) as SystemModal, it will lock the whole system until you press OK or type a password
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Combining the DX one with a modal password box can't lose
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Hehe lol

    Try this code, it should work:

    VB Code:
    1. 'This happens when the user can't play anymore :p
    2.  
    3. Do While Password<>"the password"
    4.     Password = InputBox("Your playing time has expired. Please type the correct password to continue or GET THE HELL OUTTA HERE!!!")
    5. Loop

    Please note that somewhere in the flags there should be one like "SystemModal" or something.
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width