Mengenai fungsi VB6 untuk memperoleh timeout screen saver - Bagaimanakah kita dapat memperoleh time out dari screen saver melalui kode VB6, berikut adalah jawabanya:
Cara menggunakan fungsi VB6 diatas:
READ MORE - Fungsi VB6 - Untuk Memperoleh Time Out Screen Saver
Option Explicit
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Const SPI_GETSCREENSAVETIMEOUT = 14
Function ScrTimeOut() As Integer
Dim intValue As Integer
Call SystemParametersInfo(SPI_GETSCREENSAVETIMEOUT, vbNull, intValue, 0)
ScrTimeOut = intValue
End Function
Cara menggunakan fungsi VB6 diatas:
Private Sub Command1_Click()
MsgBox ("Screen saver time-out value: " & ScrTimeOut & " seconds.")
End Sub