Click here to Skip to main content
16,016,894 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Get the time of the last event fired by an application Pin
Christian Graus30-Apr-07 12:08
protectorChristian Graus30-Apr-07 12:08 
GeneralRe: Get the time of the last event fired by an application Pin
Polymorpher30-Apr-07 12:11
Polymorpher30-Apr-07 12:11 
GeneralRe: Get the time of the last event fired by an application Pin
Dave Kreskowiak30-Apr-07 12:25
mveDave Kreskowiak30-Apr-07 12:25 
GeneralRe: Get the time of the last event fired by an application Pin
Polymorpher30-Apr-07 12:28
Polymorpher30-Apr-07 12:28 
GeneralRe: Get the time of the last event fired by an application Pin
Polymorpher30-Apr-07 12:30
Polymorpher30-Apr-07 12:30 
GeneralRe: Get the time of the last event fired by an application Pin
Dave Kreskowiak30-Apr-07 12:34
mveDave Kreskowiak30-Apr-07 12:34 
GeneralRe: Get the time of the last event fired by an application Pin
Polymorpher30-Apr-07 12:43
Polymorpher30-Apr-07 12:43 
GeneralRe: Get the time of the last event fired by an application Pin
Polymorpher30-Apr-07 13:09
Polymorpher30-Apr-07 13:09 
Do you think this would work if i used application.addfilter?

Public Class LoginTimer
Implements IMessageFilter

#Region " Delegates "
Public Delegate Sub IdleSub()
#End Region

#Region " Variables "
Private mCurrEmpTimeout As Integer
Private mLastMessage As DateTime = Nothing
Private WithEvents mBackgroundWorker As New BackgroundWorker
Private mSub As IdleSub = Nothing
#End Region

#Region " Constructor "
Public Sub New(ByVal theSub As IdleSub)
MyBase.New()
mBackgroundWorker = New BackgroundWorker
mSub = theSub
AddHandler mBackgroundWorker.DoWork, AddressOf mBackgroundWorker_DoWork
End Sub
#End Region

#Region " Event Handlers "
Private Sub mBackgroundWorker_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs)
If Not mLastMessage = Nothing Then
If DateTime.Now.Subtract(mLastMessage).TotalSeconds >= mCurrEmpTimeout Then
mSub.Invoke()
mLastMessage = DateTime.Now
End If
End If
End Sub
#End Region

#Region " IMessageFilter "
Public Function PreFilterMessage(ByRef m As System.Windows.Forms.Message) As Boolean Implements System.Windows.Forms.IMessageFilter.PreFilterMessage
mLastMessage = DateTime.Now
End Function
#End Region

End Class

Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so

QuestionAdd icons to project Pin
Manfr3d30-Apr-07 10:39
Manfr3d30-Apr-07 10:39 
QuestionAdd icons to project Pin
Manfr3d30-Apr-07 11:41
Manfr3d30-Apr-07 11:41 
AnswerRe: Add icons to project Pin
Dave Kreskowiak30-Apr-07 12:03
mveDave Kreskowiak30-Apr-07 12:03 
AnswerAdd icons to project Pin
Manfr3d30-Apr-07 14:05
Manfr3d30-Apr-07 14:05 
GeneralRe: Add icons to project Pin
kubben30-Apr-07 14:21
kubben30-Apr-07 14:21 
Questionsort array in vb Pin
kpdipen130-Apr-07 9:34
kpdipen130-Apr-07 9:34 
AnswerRe: sort array in vb Pin
Arun.Immanuel30-Apr-07 9:45
Arun.Immanuel30-Apr-07 9:45 
GeneralRe: sort array in vb Pin
Christian Graus30-Apr-07 12:09
protectorChristian Graus30-Apr-07 12:09 
GeneralRe: sort array in vb Pin
Arun.Immanuel30-Apr-07 15:16
Arun.Immanuel30-Apr-07 15:16 
GeneralRe: sort array in vb Pin
Christian Graus30-Apr-07 22:16
protectorChristian Graus30-Apr-07 22:16 
AnswerRe: sort array in vb Pin
TwoFaced30-Apr-07 12:02
TwoFaced30-Apr-07 12:02 
QuestionProblem Updating Access DB... Pin
CCG330-Apr-07 9:25
CCG330-Apr-07 9:25 
AnswerRe: Problem Updating Access DB... Pin
Dave Kreskowiak30-Apr-07 10:12
mveDave Kreskowiak30-Apr-07 10:12 
GeneralRe: Problem Updating Access DB... Pin
CCG330-Apr-07 10:31
CCG330-Apr-07 10:31 
GeneralRe: Problem Updating Access DB... Pin
Dave Kreskowiak30-Apr-07 11:59
mveDave Kreskowiak30-Apr-07 11:59 
GeneralRe: Problem Updating Access DB... Pin
CCG31-May-07 1:34
CCG31-May-07 1:34 
GeneralRe: Problem Updating Access DB... Pin
Dave Kreskowiak1-May-07 1:50
mveDave Kreskowiak1-May-07 1: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.