Click here to Skip to main content
15,896,453 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB.NET Database connections Pin
Marcie Jones7-Jan-04 9:44
Marcie Jones7-Jan-04 9:44 
Generalwat is the code for matrix function(math) Pin
vnistelrooy6-Jan-04 22:30
vnistelrooy6-Jan-04 22:30 
GeneralListView repainting problem Pin
Niels Penneman6-Jan-04 11:03
Niels Penneman6-Jan-04 11:03 
QuestionHow to install kbd hook in VB Pin
Vivek Jain6-Jan-04 7:41
Vivek Jain6-Jan-04 7:41 
GeneralMulti level binding with Datagrid Pin
DC@Home6-Jan-04 6:05
DC@Home6-Jan-04 6:05 
QuestionIs the Screensaver running? Pin
Roidzo6-Jan-04 4:20
Roidzo6-Jan-04 4:20 
AnswerRe: Is the Screensaver running? Pin
Dave Kreskowiak6-Jan-04 9:40
mveDave Kreskowiak6-Jan-04 9:40 
GeneralRe: Is the Screensaver running? Pin
Roidzo6-Jan-04 17:47
Roidzo6-Jan-04 17:47 
Thanks for replying Rage.

This is the code I am using and am getting back an error code (lastDllError code I think) of 998.
I can't seem to find any information on the error codes for SystemParametersInfoA.

Also, as VB.Net doesn't have any "Any" type I have used the VariantType, Object type, and boolean type all to no avail.


'My Code
Private Declare Function SystemParametersInfo _
Lib "user32" _
Alias "SystemParametersInfoA" _
(ByVal uiAction As Long, _
ByVal uiParam As Long, _
ByRef pvParam As VariantType, _
ByVal fWInIni As Long) As Boolean

Private Const SPI_GETSCREENSAVEACTIVE As Long = &H10
Private Const SPI_GETSCREENSAVERRUNNING As Long = &H72


Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

Dim p_lngRtn As Long
p_lngRtn = SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, bRunning, False)

If bRunning Then
Beep()
End If

If p_lngRtn = 0 Then
Debug.WriteLine(Err.LastDllError)
End If

End Sub
GeneralRe: Is the Screensaver running? Pin
Dave Kreskowiak7-Jan-04 5:03
mveDave Kreskowiak7-Jan-04 5:03 
GeneralRe: Is the Screensaver running? Pin
Roidzo7-Jan-04 7:53
Roidzo7-Jan-04 7:53 
GeneralRe: Is the Screensaver running? Pin
Dave Kreskowiak8-Jan-04 4:09
mveDave Kreskowiak8-Jan-04 4:09 
GeneralNew Project Pin
SLoughins6-Jan-04 0:38
SLoughins6-Jan-04 0:38 
GeneralRe: New Project Pin
cnurse6-Jan-04 1:59
cnurse6-Jan-04 1:59 
GeneralRe: New Project Pin
Niels Penneman6-Jan-04 11:10
Niels Penneman6-Jan-04 11:10 
Generalfreezing issue with simple client/server Pin
acecase6-Jan-04 0:04
acecase6-Jan-04 0:04 
GeneralRe: freezing issue with simple client/server Pin
cnurse6-Jan-04 2:09
cnurse6-Jan-04 2:09 
GeneralRe: freezing issue with simple client/server Pin
acecase6-Jan-04 10:03
acecase6-Jan-04 10:03 
GeneralAll Controls in Form Pin
Het21095-Jan-04 21:59
Het21095-Jan-04 21:59 
GeneralRe: All Controls in Form Pin
cnurse6-Jan-04 1:55
cnurse6-Jan-04 1:55 
Generallinking vb.net user interface with c++ dll function Pin
Member 7803585-Jan-04 20:07
Member 7803585-Jan-04 20:07 
GeneralRe: linking vb.net user interface with c++ dll function Pin
Colin Angus Mackay6-Jan-04 4:28
Colin Angus Mackay6-Jan-04 4:28 
GeneralRe: linking vb.net user interface with c++ dll function Pin
Dave Kreskowiak6-Jan-04 9:34
mveDave Kreskowiak6-Jan-04 9:34 
Generalattachments in Word Document Pin
Anonymous5-Jan-04 7:31
Anonymous5-Jan-04 7:31 
GeneralI Don't wanna go to Add/Remove Program to Uninstall my application Pin
jlizardo5-Jan-04 7:29
jlizardo5-Jan-04 7:29 
GeneralRe: I Don't wanna go to Add/Remove Program to Uninstall my application Pin
Niels Penneman6-Jan-04 11:15
Niels Penneman6-Jan-04 11:15 

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.