Code: Select all
Private Sub itmrClose_UserInactive()
PDF1.Visible = True
If Dir("C:\Print - Confirmation.pdf") <> "" Then
Me.AcrobatPath = "C:\Print - Confirmation.pdf"
Me.PDF1.LoadFile Me.AcrobatPath
Else
Me.AcrobatPath = "L:\MMPDF\Utilities\PDFViewer.pdf"
Me.PDF1.LoadFile Me.AcrobatPath
End If
End Sub
Code: Select all
Private Sub Form_Load()
itmrClose.InactiveInterval = 1000 * Val(txtInactiveSeconds.Text)
itmrClose.Enabled = True
End Sub
Code: Select all
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
itmrClose.Enabled = False
End Sub
Once the form is inactive for 30 seconds the code fires and loads the document, great because that's what I want it to do.
But the form carries on flashing, so I put "itmrClose.Enabled = False" after the event has fired.
Code: Select all
Private Sub itmrClose_UserInactive()
PDF1.Visible = True
If Dir("C:\Print - Confirmation.pdf") <> "" Then
Me.AcrobatPath = "C:\Print - Confirmation.pdf"
Me.PDF1.LoadFile Me.AcrobatPath
[b]itmrClose.Enabled = False[/b]
Else
Me.AcrobatPath = "L:\MMPDF\Utilities\PDFViewer.pdf"
Me.PDF1.LoadFile Me.AcrobatPath
[b]itmrClose.Enabled = False[/b]
End If
End Sub
How can I fix this?