Click here to Skip to main content
15,912,977 members
Home / Discussions / C#
   

C#

 
QuestionListView Pin
al3xutzu006-May-09 12:26
al3xutzu006-May-09 12:26 
AnswerRe: ListView Pin
Henry Minute6-May-09 13:37
Henry Minute6-May-09 13:37 
AnswerRe: ListView Pin
Roberto Ho6-May-09 13:50
Roberto Ho6-May-09 13:50 
AnswerRe: ListView Pin
nsimbu6-May-09 13:51
nsimbu6-May-09 13:51 
QuestionConvert .Net datatype to Mysql datatype Pin
student19886-May-09 12:14
student19886-May-09 12:14 
AnswerRe: Convert .Net datatype to Mysql datatype Pin
Colin Angus Mackay6-May-09 12:21
Colin Angus Mackay6-May-09 12:21 
GeneralRe: Convert .Net datatype to Mysql datatype Pin
student19886-May-09 12:37
student19886-May-09 12:37 
GeneralRe: Convert .Net datatype to Mysql datatype Pin
Colin Angus Mackay6-May-09 12:47
Colin Angus Mackay6-May-09 12:47 
GeneralRe: Convert .Net datatype to Mysql datatype Pin
student19886-May-09 13:01
student19886-May-09 13:01 
GeneralRe: Convert .Net datatype to Mysql datatype Pin
Luc Pattyn6-May-09 13:09
sitebuilderLuc Pattyn6-May-09 13:09 
GeneralRe: Convert .Net datatype to Mysql datatype Pin
student19886-May-09 13:26
student19886-May-09 13:26 
GeneralRe: Convert .Net datatype to Mysql datatype Pin
Luc Pattyn6-May-09 13:58
sitebuilderLuc Pattyn6-May-09 13:58 
QuestionGateway port forwarding Pin
evangile6-May-09 11:47
evangile6-May-09 11:47 
AnswerRe: Gateway port forwarding Pin
harold aptroot6-May-09 11:59
harold aptroot6-May-09 11:59 
GeneralRe: Gateway port forwarding Pin
evangile6-May-09 12:05
evangile6-May-09 12:05 
QuestionRe: Gateway port forwarding Pin
harold aptroot6-May-09 12:10
harold aptroot6-May-09 12:10 
AnswerRe: Gateway port forwarding Pin
evangile6-May-09 12:17
evangile6-May-09 12:17 
GeneralRe: Gateway port forwarding Pin
harold aptroot6-May-09 22:08
harold aptroot6-May-09 22:08 
GeneralRe: Gateway port forwarding Pin
evangile6-May-09 23:05
evangile6-May-09 23:05 
GeneralRe: Gateway port forwarding Pin
harold aptroot6-May-09 23:36
harold aptroot6-May-09 23:36 
QuestionFind out if a class is initialized with reflection. Pin
belzer6-May-09 11:26
belzer6-May-09 11:26 
QuestionProcess.Kill() problem Pin
Mel Feik6-May-09 10:42
Mel Feik6-May-09 10:42 
I have a simple application timer program - allows any executable to launched, with command line arguments (optional) and terminates after specified number of minutes.

Here's how I'm currently terminating timed process:

while (true)
            {
                //keep checking if timer expired or app closed externally (ie. by user)
                if (dtEndTime <= DateTime.Now || p.HasExited)
                {
                    if (!p.HasExited)
                        p.Kill();
                    break;
                }
                System.Threading.Thread.Sleep(500);
            }

Rather straight forward and works most of the time. A crash occurs when I am timing a program called Fraps.exe and its minimized to the tray. The crash itself doesn't always have the same results.

What is consistant is:
- the app Kill() is called for IS closed
- a crash occurs
What varies:
- another app in the tray will crash as well (intermittently)

If I do not minimize Fraps.exe to the tray no crash occurs (however, leaving it on the desktop is not an acceptable solution). Fraps can be closed via task manager without issue.

Any suggestions on how to terminate an external application more gracefully? Process.Close() and Process.CloseMainWindow() have already be ruled out for the case of being in the tray. I'm open to anything will work and not cause a crash.

---------------------------------------------
Help... I'm embedded and I can't get out!

If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler

GeneralI made a T9 Dictianary [modified] Pin
emrah19826-May-09 10:26
emrah19826-May-09 10:26 
GeneralRe: I made a T9 Dictianary Pin
Henry Minute6-May-09 10:32
Henry Minute6-May-09 10:32 
GeneralRe: I made a T9 Dictianary Pin
emrah19826-May-09 10:48
emrah19826-May-09 10:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.