|
-
January 9th, 2009, 08:37 AM
#1
playing your own custom screen saver
Is there an api or class for screen savers. I want to add a screen saver to my program and be able to set how long it takes to kick in and be able to play videos/slideshows randomly as screensavers. Alternatively if someone knows how to do it with xp how can i add a list of videos to be played randomly. I know xp can play slides of your pictures but can you do this with videos.
Thank you
-
January 9th, 2009, 03:31 PM
#2
Re: playing your own custom screen saver
I don't know of a class for it yet, but you can use the following API, and function to obtain, the number of milliseconds since the last input(key/mouse).
Code:
Private Structure PLASTINPUTINFO
Public cbSize, dwTime As Int32
End Structure
Private Declare Function apiGetLastInputInfo Lib "user32" Alias "GetLastInputInfo" (ByRef plii As PLASTINPUTINFO) As Int32
Private Declare Function apiGetTickCount Lib "kernel32" Alias "GetTickCount" () As Int32
Private Function GetLastInput() As Int32
Dim li As New PLASTINPUTINFO
li.cbSize = Runtime.InteropServices.Marshal.SizeOf(li)
apiGetLastInputInfo(li)
GetLastInput = (apiGetTickCount - li.dwTime)
End Function
Private Sub Timer1_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
Me.Text = GetLastInput()
End Sub
-
January 10th, 2009, 03:41 AM
#3
Re: playing your own custom screen saver
Are you talking about making your own screen saver? There are actually just normal programs which have been renamed as .scr, and they have a few standard control inputs.
A quick search on google should should turn up the skeleton code to desgin your own screensaver.
Help from me is always guaranteed!*
VB.NET code is made up on the spot with VS2008 Professional with .NET 3.5. Everything else is just made up on the spot.
Please Remember to rate posts, use code tags, send me money and all the other things listed in the "Before you post" posts.
*Guarantee may not be honoured.
-
January 10th, 2009, 04:13 PM
#4
Re: playing your own custom screen saver
How about a different image on dual-monitors for the screen saver?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|