The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> C Programming
|
Is it possible to write this program on C?
Discuss Is it possible to write this program on C? in the C Programming forum on Dev Shed. Is it possible to write this program on C? C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

October 17th, 2012, 03:22 PM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 3
Time spent in forums: 1 h 1 m 25 sec
Reputation Power: 0
|
|
|
Is it possible to write this program on C?
At the moment I'm a statistcs graduation student with the basics of C programming knowledge.
The idea is basically a program wich running in the "background" can get a combination of keys (let's say something like alt+8), and whenever the combination is pressed, a chronometer starts running from a certain time to 0. But what makes me think this is really unlikely, I need the time counter to be shown over other program, and in a certain region of the screen.
As an example, assume you're downloading a file and the download will finish in 25 minutes, now assume you're using a full screen application, then you should be able to know when the download is finished without closing/minimizing the full screen program.
I know it seems useless at first, but sometimes it'd make some stuff easier to have such a program and at the same time, learning about new librearies is always helpful.
By the way, if it's not possible in C, any other language I could try?
|

October 17th, 2012, 03:30 PM
|
|
Contributing User
|
|
Join Date: Oct 2012
Posts: 71
Time spent in forums: 1 Day 7 h 39 m 39 sec
Reputation Power: 1
|
|
|
You might want to state which operating system the code will run on.
|

October 17th, 2012, 03:32 PM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 3
Time spent in forums: 1 h 1 m 25 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by G4143 You might want to state which operating system the code will run on. | Windows 7 64bits.
GNU GCC Compiler.
|

October 17th, 2012, 03:33 PM
|
 |
Contributed User
|
|
|
|
|
Let's start with the basics.
Which operating system and compiler do you have?
The choice of programming language is somewhat irrelevant.
If your OS/GUI/Window manager doesn't allow popup notifications over full-screen windows, then you're pretty much stuck regardless of which language you choose.
|

October 17th, 2012, 03:47 PM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 3
Time spent in forums: 1 h 1 m 25 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by salem Let's start with the basics.
Which operating system and compiler do you have?
The choice of programming language is somewhat irrelevant.
If your OS/GUI/Window manager doesn't allow popup notifications over full-screen windows, then you're pretty much stuck regardless of which language you choose. | As I said, I plan on running it on a Windows 7 64 bits.
At this moment the compiler I have is minGW32-gcc, but I can use other compilers/OS in case these become a problem.
|

October 17th, 2012, 04:40 PM
|
 |
The bad and the ugly...
|
|
Join Date: Jan 2007
Location: Oz... No??? Neverland then?
Posts: 142
Time spent in forums: 1 Day 6 h 21 m 2 sec
Reputation Power: 0
|
|
Quote: | If your OS/GUI/Window manager doesn't allow popup notifications over full-screen windows, then you're pretty much stuck regardless of which language you choose. |
i'd google this as a starting point. the problem with C is that it doesn't really have any graphics header files. there's a graph.h but i dont know of any for pop-up windows.
can't the task-bar remain on top of whatever you run? if so, that makes me thing that this is definitely possible in windows. heck, take league of legends as an example. when the game first starts, and all the summoners connect, theres an emblem in the middle of the screen. even if you start typing in a word document, or browsing a web page, it sits there right in the middle of the screen.
__________________
"Life is not a journey with the intent on arriving at the finish line in a pretty and well preserved body. But rather to skid in broadside, totally worn out, thoroughly used up and loudly proclaiming, "Wow! What a ride!" -Anonymous
Halo! || Diablo 2 LOD Modding || OLGA's BACK!
|

October 17th, 2012, 05:03 PM
|
 |
I'm Baaaaaaack!
|
|
Join Date: Jul 2003
Location: Maryland
|
|
|
As mentioned, this is not a C issue at all, it is specific to the OS windows manager. You are going to have to look in OS specific GUI design forums unless you get lucky here.
|

October 17th, 2012, 08:18 PM
|
 |
Contributing User
|
|
|
|
|
I'll bet it's a trivial tcl program.
Implementation details to be determined.
__________________
[code] Code tags[/code] are essential for python code!
|

October 18th, 2012, 04:10 PM
|
 |
Contributing User
|
|
|
|
|
bash/tcl solution
Code:
sleep 600 # 10 minutes
wish
button .submit -text "Click Me" -command { puts "\nHello World" }
pack .submit
|

October 19th, 2012, 12:37 PM
|
 |
Contributing User
|
|
Join Date: Aug 2003
Location: UK
|
|
In Windows you can assign a keyboard short-cut to any executable file via the "Shortcut" tab of the file's properties dialog (right-click, select Properties).
Any GUI application main window or dialog box can have its window attributes set to "always-on-top", and such a GUI application can indeed be programmed in C. MinGW is a somewhat primitive tool however for GUI programming - you can write code to the Win32 API, but it has no visual design tools or even a simple resource editor. You could use a higherlevel GUI framework such as Qt or wxWidgets, but those are C++ as are most GUI frameworks, so C++ might be a better option in any case.
Another option is C#. The .NET framework and Windows Forms is very easy to work with and the tools are free.
See Visual Studio 2012 Express Edition A complete suite for C#, C, C++ and more.
When you say "full screen", do you mean full screen or simply a maximised window? Even "always on top" may not work on some full-screen apps I imagine. Why don't you just get a cooking timer or use an app on your mobile phone? It probably already has one.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|