peek-a-boo

Sharky Forums


Results 1 to 6 of 6

Thread: peek-a-boo

  1. #1
    Goldfish qwe's Avatar
    Join Date
    Sep 2002
    Location
    London
    Posts
    69

    peek-a-boo

    I want to write a program (for windows) that goes away when I press some keys and then comes back when I press them again. If anyone can point me to a website or something that would be really helpful. Thanks
    Possesions never meant anything to me,
    I'm not crazy.
    Well that's not true I have a bed,
    and a guitar and a dog named dog.

  2. #2
    NullPointerException rock's Avatar
    Join Date
    Sep 2000
    Location
    York, PA
    Posts
    6,203
    Aft-F4 works pretty well to make a program go away

    What do mean by "go away"? To just minimize? Or really suspend its state and close?

    Open Source is free like a puppy is free.

    It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames.

    Understanding Evolution

  3. #3
    Goldfish qwe's Avatar
    Join Date
    Sep 2002
    Location
    London
    Posts
    69
    I mean I want to be able to close the window of the program but still leave the program running so that when I want to use it again, I just have to type in a certain key combination
    Possesions never meant anything to me,
    I'm not crazy.
    Well that's not true I have a bed,
    and a guitar and a dog named dog.

  4. #4
    Hammerhead Shark xDUCK's Avatar
    Join Date
    Dec 2002
    Location
    Vancouver, BC, Canada
    Posts
    2,992
    This should be as easy as creating a WinMain, a window to show/hide, and listening for keystrokes. I assume you know how to do the first two - as for the second, just search the web for C++ keyboard tutorials.

    Anything's Hot Swappable if you're fast enough.

    Owner of zeroBel.com.

    [ My rig ]
    24/7: 260FSBx9.5 CPU Interface Enabled 1:1 2-2-2-11 (2.0v VDD, 3.4v Vdimm)

    NF7-S rev2.0 C1 d10 / 2500+ AQXEA SPMW "9" "27" / 256mb KHX3200 (BH-5) + 2x256mb Corsair 3200LL (also BH-5) / 80gb/7200/2mb IBM Deskstar / 80gb/7200/8mb Seagate SATA / ATI Radeon 9800 Pro 128 / 22" NEC FP2141-BK / Sennheiser HD570

    Sharky Extreme 3DMark Team


    Official member of the Big_Mac-is-generous club!

  5. #5
    NullPointerException rock's Avatar
    Join Date
    Sep 2000
    Location
    York, PA
    Posts
    6,203
    The problem is that when it's "gone" it doesn't have focus and will have trouble responding to keyboard events. You're going to have to poll the keyboard at a much lower level than I'm used to dealing with in the .NET and Java worlds.

    Open Source is free like a puppy is free.

    It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames.

    Understanding Evolution

  6. #6
    Goldfish qwe's Avatar
    Join Date
    Sep 2002
    Location
    London
    Posts
    69
    thanks for the advice.
    Possesions never meant anything to me,
    I'm not crazy.
    Well that's not true I have a bed,
    and a guitar and a dog named dog.

Posting Permissions

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