Results 1 to 13 of 13

Thread: Background Image

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    Background Image

    I've got a program which works on a time, it selects a image at random froma list.

    IE: Dim FileDet As String = "C:\Desktop\Photos\pic1.jpg"

    How can i get VB.Net to change this as much background image????

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Background Image

    Quote Originally Posted by kiwis
    I've got a program which works on a time, it selects a image at random froma list.

    IE: Dim FileDet As String = "C:\Desktop\Photos\pic1.jpg"

    How can i get VB.Net to change this as much background image????
    Hi,

    You want that every time the random choose picture the background picture changes in the choosen picture.

    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    Re: Background Image

    Yes that's right

  4. #4
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Background Image

    Quote Originally Posted by kiwis
    Yes that's right
    Hi,

    What do you have so far?

    wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    Re: Background Image

    I don't have a clue where to start?

  6. #6
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Background Image

    Hi,

    What is the version your working with.

    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    Re: Background Image

    2005

  8. #8
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Background Image

    Hi,

    I created somecode.
    It's possible that there's a better way but it works.
    It's very late this time of day , so I 'm very tired and wants to go to sleep
    But anyway you can tried it this way:

    Code:
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Timer1.Start() ' timer set to 5000 or the time needed to change
        End Sub
    
        Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            Static Dim Image As Integer
            Select Case Image
                Case 0
                    Me.BackgroundImage = My.Resources.name of the image
                    Image += 1
                Case 1
                    Me.BackgroundImage = My.Resources.name of the image
                    Image = 0
            End Select
        End Sub
    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    Re: Background Image

    Thanks but I mean my desktop background

  10. #10
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Re: Background Image

    This might be useful:

    http://www.devx.com/tips/Tip/21380
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    Re: Background Image

    Thanks, also how could I get the file location from my current wallpaper image?

  12. #12
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Background Image

    Quote Originally Posted by kiwis
    Thanks but I mean my desktop background
    Hi,

    Do you mean that you want to create a Screensaver.

    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  13. #13

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    Re: Background Image

    I'm i'm making a program which uses selected files to changed my wallpaper every so often (set by a timer event)

    I really need to know two things

    1. How to set a image as a wallpaper
    2. How to get the details of the current wallpaper

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width