View previous topic :: View next topic |
Author |
Message |
FullyAwesome I post too much Reputation: 0
Joined: 05 Apr 2007 Posts: 4438 Location: Land Down Under
|
Posted: Wed Nov 05, 2008 3:09 am Post subject: Timed Launcher App (Updated V2) |
|
|
I've updated this program, it's now V2
Changes:
- can now open more than one application at once
- new timer, displays hours, minutes seconds.
- modified GUI
- recoded into C#
- new icon OMFG!
- probably some more stuff that i forgot.
a little project which i'm quite happy of.
please feel free to critisize and make suggestions. if there are any bugs or anything that doesn't seem right please tell me about it. the more suggestions you make, the more i learn about C#.
refresh if you can't see image or attachement.
requires DotNet Framework to run.
Description: |
|
Filesize: |
75.67 KB |
Viewed: |
21752 Time(s) |
|
_________________
Last edited by FullyAwesome on Thu Nov 20, 2008 3:07 pm; edited 5 times in total |
|
Back to top |
|
|
Snootae Grandmaster Cheater Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Wed Nov 05, 2008 5:01 am Post subject: |
|
|
add the option for hours and the option to kill a program at a ceratin time
you should really make a form for adding one and add it to a listbox so you can launch and close lots of stuff
_________________
|
|
Back to top |
|
|
clanner Master Cheater Reputation: 0
Joined: 26 Jul 2006 Posts: 290
|
Posted: Wed Nov 05, 2008 8:39 am Post subject: |
|
|
Just curious but where did you learn the .net commands? I was unable to find a tutorial on the internet that could teach me. I don't like to use MSDN since... it always gives me weird answers or maybe I'm not reading them right.
|
|
Back to top |
|
|
FullyAwesome I post too much Reputation: 0
Joined: 05 Apr 2007 Posts: 4438 Location: Land Down Under
|
Posted: Wed Nov 05, 2008 2:47 pm Post subject: |
|
|
clanner wrote: | Just curious but where did you learn the .net commands? I was unable to find a tutorial on the internet that could teach me. I don't like to use MSDN since... it always gives me weird answers or maybe I'm not reading them right. |
read through the MSDN tutorials on vb.net, then intellisense pretty much helps you with the rest.
and @snootae, i'll end up making it better when i have a little time, i only made it in about 10 minutes one night when i needed to set the time for a download.
_________________
|
|
Back to top |
|
|
samuri25404 Grandmaster Cheater Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Wed Nov 05, 2008 3:29 pm Post subject: |
|
|
Few suggestions:
Convert the "seconds remaining" to a time readable by humans, e.g. 3 hours, 24 minutes, 2 seconds.
You can accomplish this using a combination of the modulus operator and the division operator.
C#:
Code: |
int secondsRemaining = ...
int Hours = secondsRemaining / 3600;
secondsRemaining %= 3600;
int Minutes = secondsRemaining / 60;
secondsRemaining %= 60;
int Seconds = secondsRemaining;
txtRemaining.Text = Hours.ToString() + " hours, " + Minutes.ToString() + " minutes, and " + Seconds.ToString();
|
Add command line parameters as options.
Also make a ListBox, as Snootae suggested, and keep track of remembered programs and their command lines.
Edit: If it doesn't do this already (which I doubt it does, though I haven't downloaded it), allow it to minimize to tray, and when you hover over the icon, set the tooltip's text to be the time remaining.
_________________
|
|
Back to top |
|
|
FullyAwesome I post too much Reputation: 0
Joined: 05 Apr 2007 Posts: 4438 Location: Land Down Under
|
Posted: Wed Nov 05, 2008 11:34 pm Post subject: |
|
|
i know how to make it display minutes and seconds, i just left it like that so i could see that it was working, as i said it was something quick.
when i get to upgrading i was going to:
1. recode it in c#, rather than vb.net
2. make a minimize to tray option
3. i was thinking about making easy command line options for like shutting down and such
4. i was gonna make it multi-app launchable.
thanks for the suggestions though.
_________________
|
|
Back to top |
|
|
--Pillboi-- Grandmaster Cheater Supreme Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Thu Nov 06, 2008 3:06 pm Post subject: |
|
|
fullyawesome wrote: | 4. i was gonna make it multi-app launchable. |
At different times? Or more than one program at the same time?
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
Back to top |
|
|
FullyAwesome I post too much Reputation: 0
Joined: 05 Apr 2007 Posts: 4438 Location: Land Down Under
|
Posted: Thu Nov 20, 2008 12:56 am Post subject: |
|
|
updated to V2.
_________________
|
|
Back to top |
|
|
DeletedUser14087 I post too much Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Thu Nov 20, 2008 2:25 am Post subject: |
|
|
Suggestion: Make a snapshot of all the processes and store it in a variable, then loop process by process until it meets the one the user wants to kill and use TERMINATE_PROCESS access flag within the process then make sure it returns TRUE and terminate the process and close the snapshot from the variable it is stored to avoid memory leaks.
|
|
Back to top |
|
|
FullyAwesome I post too much Reputation: 0
Joined: 05 Apr 2007 Posts: 4438 Location: Land Down Under
|
Posted: Thu Nov 20, 2008 2:39 am Post subject: |
|
|
Rot1 wrote: | Suggestion: Make a snapshot of all the processes and store it in a variable, then loop process by process until it meets the one the user wants to kill and use TERMINATE_PROCESS access flag within the process then make sure it returns TRUE and terminate the process and close the snapshot from the variable it is stored to avoid memory leaks. |
so make an option to be able to terminate the processes that have started?
_________________
|
|
Back to top |
|
|
DeletedUser14087 I post too much Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Thu Nov 20, 2008 4:28 am Post subject: |
|
|
fullyawesome wrote: | Rot1 wrote: | Suggestion: Make a snapshot of all the processes and store it in a variable, then loop process by process until it meets the one the user wants to kill and use TERMINATE_PROCESS access flag within the process then make sure it returns TRUE and terminate the process and close the snapshot from the variable it is stored to avoid memory leaks. |
so make an option to be able to terminate the processes that have started? |
Yes.
Hint: Instead of going all this trouble, use CreateProcess, and TerminateProcess on the handle that is stored in the PROCESS_INFORMATION structure.
|
|
Back to top |
|
|
--Pillboi-- Grandmaster Cheater Supreme Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Thu Nov 20, 2008 11:40 am Post subject: |
|
|
Nice update.
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
Back to top |
|
|
hcavolsdsadgadsg I'm a spammer Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Nov 20, 2008 2:05 pm Post subject: |
|
|
Better yet, look at the Process class. (which I guess you're using already?)
You can start, kill, and get all the information you'll need about whatever process it is.
|
|
Back to top |
|
|
FullyAwesome I post too much Reputation: 0
Joined: 05 Apr 2007 Posts: 4438 Location: Land Down Under
|
Posted: Thu Nov 20, 2008 2:49 pm Post subject: |
|
|
k thanks for the ideas you two (slovach and rot1), and thanks Pillboi. you gave me a good idea of what to add to the program next.
_________________
|
|
Back to top |
|
|
|