Create Your Own Screen Saver In Vb.NET

   With Visual Studio .NET you can introduce an animated .gif into a Picture Box Control without any code or external activeX control. This allows you to implement impressive screensaver easily.




				Follow this steps:

1) Create new Proyect

-Creates a new Windows Aplication Project
-Create a Picture Box in your form

2) With Picture Box:

-Click in Image property and select an image or an animated GIF
-Set Dock property to Fill
-Set SizeMode property to StretchImage

3) With Form:

-Set WindowState property to Maximized
-Set FormBorderStyle property to None
-Set TopMost property to True

4) Now paste this code:

Private xposition As Integer Private yposition As Integer Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress Me.Close() End End Sub Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove If Not PictureBox1.MousePosition.X.Equals(xposition) Or _ Not PictureBox1.MousePosition.Y.Equals(yposition) Then Me.Close() End End If End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load xposition = PictureBox1.MousePosition.X yposition = PictureBox1.MousePosition.Y End Sub

5) Generate the proyect

6) How to test your ScreenSaver

-Go to bin folder of your proyect and change executable extension to .scr
E.j. MyScreensaver.exe —-> MyScreensaver.scr
-Copy this file into your system directory
Windows 98: c:\windows\system
Windows NT/2000/XP: c:\winnt\system32
-Now go to Windows Screen Properties (Right mouse button over Desktop) and select your screensaver.
-Test it. It Runs!!!


I Am Developer And Want To Share My Knowledge With The World..:) ;) . I Have Another Social Networking Website (Renewchat) And For Designing Or Developing Of Website Purpose You Can Contact Me On Renew Coder .. :) ;)

5 thoughts on “Create Your Own Screen Saver In Vb.NET

Leave a Reply

Your email address will not be published. Required fields are marked *