Thread: Desktop Counter

  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    4

    Desktop Counter

    Desktop Counter
    Hi, I would like to create & place a single counter on my desktop to count the number of times we answer the telephone during the day. the idea is to place a telephone image on the desktop and everytime the mouse is clicked on it it records the number of clicks. Is this easy to do? If yes How. Looking forward to reply. I am new to this and not too clever on programming so any advice will be much appreciated

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    This is not a C programming problem at all.

    It is easy to create a program with an icon, and record number of mouse clicks on that icon. The techniques to do that depend on your host operating and windows systems (windows, linux/gnome, etc) but there are plenty of examples around that you can find using google.

    In terms of interacting with the phone, that is not really standard from any desktop computer, as it relies on the telephone device. You will need to do some homework, and find a phone (the device) and infrastructure (modems, etc) that has a capability to interface with a PC. Generally, such products will be accompanied by a library that supports such interactions with a computer, and documentation on how to do it. Bear in mind the techniques will often be specific to the setup. If your phone is a relatively recent mobile/cell (eg a smart phone) it might have native apps and interfacing (eg USB, wireless, etc) that allows interaction with desktop. Again, it's not hard, but you need to do some homework to find relevant information about your phone or phone system (or to select a new one).
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    Ultraviolence Connoisseur
    Join Date
    Mar 2004
    Posts
    555
    Yes its quite easy to do. Beyond that you're not going to get any code from us.

    This is highly specialized forum dealing explicitly with ANSI C and thats it, no Win32 programming, etc..

    Now, you could do this with ANSI C entirely though, by simply making it so when you click the program it executes the program, then have the program read/write to a file updating the number of times its ran. But more likely you'd want to use some win32 programming magic (or maybe just a simple VBScript?)

    In short, C is probably not the answer if you want to do this "easily and quickly".

  4. #4
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    It sounds like what the OP wants is a simple GUI app that provides a "system tray icon" that responds to click events. A simple way to develop it would be to use a GUI toolkit such as Qt. They have many tutorials, including one for the System Tray icon. Qt 4.7: System Tray Icon Example

    However, successfully building that example and modifying it for your purpose has the prerequisites of some basic programming knowledge AND have some basic experience with the GUI toolkit. Since you are "new to this" it's fine if you have a specific goal, but why not start with the basics. It's like... you've got to learn at least basic addition and subtraction before you can try to solve algebra problems.

  5. #5
    Registered User
    Join Date
    Jan 2013
    Posts
    4
    Thank you for your prompt response. You have been very helpful. I was not sure that this was the right forum. I am 75 years old but still a bit bright and willing to learn. thanks again and have a nice day/night or whatever

  6. #6
    Registered User
    Join Date
    Jan 2013
    Posts
    4
    Thank you for your prompt response. You also have been very helpful. Had a look at Qt 4.7: and it was a bit daunting but I can see that it might be the way to go. The OS is Win 7 Pro and it looks as if your saying that an icon on the systray would be then answer or is ther likely to be something in the OS that might do the job

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Desktop Counter
    By oldrockferrian in forum Windows Programming
    Replies: 1
    Last Post: 01-13-2013, 01:48 AM
  2. Counter
    By jackirl in forum C++ Programming
    Replies: 5
    Last Post: 11-27-2011, 12:01 PM
  3. Page File counter and Private Bytes Counter
    By George2 in forum Tech Board
    Replies: 0
    Last Post: 01-31-2008, 03:17 AM
  4. counter
    By Colonial Viper in forum C++ Programming
    Replies: 4
    Last Post: 04-01-2005, 11:44 AM
  5. Help!Counter...
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 05-25-2002, 01:14 AM