Click here to Skip to main content
15,881,248 members
Home / Discussions / C#
   

C#

 
AnswerRe: Console Menu Application Pin
Lutosław25-Aug-07 7:53
Lutosław25-Aug-07 7:53 
GeneralRe: Console Menu Application Pin
invalidsyntax101025-Aug-07 8:52
invalidsyntax101025-Aug-07 8:52 
GeneralRe: Console Menu Application Pin
Lutosław25-Aug-07 9:16
Lutosław25-Aug-07 9:16 
QuestionXML attribute Pin
ytubis25-Aug-07 5:30
ytubis25-Aug-07 5:30 
QuestionTime elapsed since user logged in Pin
Lutosław25-Aug-07 5:25
Lutosław25-Aug-07 5:25 
AnswerRe: Time elapsed since user logged in Pin
Hessam Jalali25-Aug-07 12:16
Hessam Jalali25-Aug-07 12:16 
GeneralRe: Time elapsed since user logged in Pin
Lutosław25-Aug-07 23:21
Lutosław25-Aug-07 23:21 
GeneralRe: Time elapsed since user logged in Pin
Hessam Jalali26-Aug-07 0:26
Hessam Jalali26-Aug-07 0:26 
unfortunately it seems there is no LogOutTime property (at least I didn't found out anyOne)

but AFAIK In windows only on user can work at the same time

so there is a class in .NET name Microsoft.Win32.SystemEvents.SessionEnding it happens when a user trying to logoff or shutdown

so you can find active user through WMI again or through System.Environment.UserName
and find you are in which session.

I think with adding the event to the class you can find total duration.(but it needs your program always run or atleaset when user is going to logout or shutdown)

if you get the duration inside the method associated with that event it would be total user log time.

ofcourse there is another approaches like looking inside eventlogs but i think this is the easiest one

hope the post would be useful
GeneralRe: Time elapsed since user logged in Pin
Lutosław26-Aug-07 0:51
Lutosław26-Aug-07 0:51 
GeneralRe: Time elapsed since user logged in Pin
Hessam Jalali28-Aug-07 10:39
Hessam Jalali28-Aug-07 10:39 
QuestionProblem to Loading Data via Another Form. Pin
hdv21225-Aug-07 4:49
hdv21225-Aug-07 4:49 
QuestionTag name Pin
ytubis24-Aug-07 23:44
ytubis24-Aug-07 23:44 
AnswerRe: Tag name Pin
Christian Graus25-Aug-07 0:49
protectorChristian Graus25-Aug-07 0:49 
AnswerRe: Tag name 2 Pin
Luc Pattyn24-Aug-07 23:35
sitebuilderLuc Pattyn24-Aug-07 23:35 
GeneralRe: Tag name 2 Pin
hdv21225-Aug-07 7:56
hdv21225-Aug-07 7:56 
GeneralRe: Tag name 2 Pin
Luc Pattyn25-Aug-07 8:21
sitebuilderLuc Pattyn25-Aug-07 8:21 
GeneralRe: Tag name 2 Pin
Paul Conrad25-Aug-07 9:26
professionalPaul Conrad25-Aug-07 9:26 
AnswerRe: Tag name Pin
Luc Pattyn24-Aug-07 23:33
sitebuilderLuc Pattyn24-Aug-07 23:33 
GeneralRe: Tag name Pin
ytubis24-Aug-07 23:45
ytubis24-Aug-07 23:45 
Questionwebhosting Pin
kalyan_241624-Aug-07 22:53
kalyan_241624-Aug-07 22:53 
Answerummk Pin
invalidsyntax101025-Aug-07 7:28
invalidsyntax101025-Aug-07 7:28 
QuestionHow to catch Url from internet explorer in my Downloader? Pin
Pinkesh Gandhi24-Aug-07 22:50
Pinkesh Gandhi24-Aug-07 22:50 
QuestionReusing a socket Pin
Chals24-Aug-07 22:30
Chals24-Aug-07 22:30 
Question)c# Pin
lankaudaranga24-Aug-07 22:20
lankaudaranga24-Aug-07 22:20 
AnswerRe: )c# Pin
Christian Graus25-Aug-07 0:50
protectorChristian Graus25-Aug-07 0:50 

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.