Thread: Possible???

Results 1 to 7 of 7
  1. #1
    FWESFWSERGFwesg's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    202
    Reputation
    9
    Thanks
    18
    My Mood
    Inspired

    Possible???

    Hey i've never attempted this till now, But is it possible to put multiplie images in a picture box and have a pattern like display image 1 second's then display image 2 second's so on.???
    @Cho Chang
    @NextGen1
    I Am asking if this is possible and maybe how to do it?
    Thank you.

  2. #2
    Nathan's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    In a magical place
    Posts
    6,113
    Reputation
    394
    Thanks
    363
    Like a slideshow?

  3. #3
    FWESFWSERGFwesg's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    202
    Reputation
    9
    Thanks
    18
    My Mood
    Inspired
    Yes @Cookie. Thats what i ment sorry.

  4. #4
    Lyoto Machida's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    Far away with girls
    Posts
    3,734
    Reputation
    133
    Thanks
    1,621
    My Mood
    Aggressive
    Dim img As String = "C:\File"

    Dim Count As integer = 1

    TIMER
    Picturebox1.ImageLocation = img & Count & ".jpg"
    Count +=1

  5. #5
    FWESFWSERGFwesg's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    202
    Reputation
    9
    Thanks
    18
    My Mood
    Inspired
    @Away-
    @Cookie.
    Like this?
    Wait i got it thanx
    @Cho Chang Request close.
    Code:
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    02
    
    03
            Dim max As Integer = 5000
    04
            Dim rnd As New Random
    05
            Dim rand As Integer = rnd.Next(10, max + 1)
    06
            Dim i As Integer = 1
    07
            Dim number(max - 1) As Integer
    08
     
    09
            For i = 0 To max - 1
    10
                If number(i) = rand Then
    11
                    rand = rnd.Next(1, max + 1)
    12
                    i = -1
    13
                ElseIf number(i) = 0 Then
    14
                    number(i) = rand
    15
                    rand = rnd.Next(1, max + 1)
    16
                    If i = max - 1 Then
    17
                        Exit For
    18
                    End If
    19
                    i = -1
    20
                End If
    21
            Next
    22
            Timer1.Interval = number(i)
    23
            i += 1
    24
     
    25
            ChangeImage()
    26
        End Sub
    27
     
    28
        Private Sub ChangeImage()
    29
     
    30
            Static Dim iImage1 As Integer
    31
     
    32
            Select Case iImage1
    33
                Case 0
    34
     
    35
                    pbNewImage.Visible = True
    36
                    pbNewImage.Image = My.Resources.imagename
    37
                    iImage1 += 1
    38
                Case 1
    39
     
    40
                    pbNewImage.Visible = True
    41
                    pbNewImage.Image = My.Resources.imagename
    42
                    iImage1 += 1
    43
                Case 2
    44
     
    45
                    pbNewImage.Visible = True
    46
                    pbNewImage.Image = My.Resources.imagename
    47
                    iImage1 += 1
    48
                Case 3
    49
     
    50
                    pbNewImage.Visible = True
    51
                    pbNewImage.Image = My.Resources.imagename
    52
                    iImage1 += 1
    53
                Case 4
    54
     
    55
                    pbNewImage.Visible = True
    56
                    pbNewImage.Image = My.Resources.imagename
    57
                    iImage1 = 0
    58
     
    59
            End Select
    60
        End Sub
    61
        
    62
        Private Sub btnView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnView.Click
    63
            Timer1.Start()
    64
        End Sub
    Last edited by FWESFWSERGFwesg; 06-01-2011 at 11:18 AM.

  6. #6
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Create a List(Of Image), store all your images in there. On a given event step 1 more image through the list, it's not hard.

    Example:

    Create an instance variable:
    [highlight=vb.net]
    Private imageIndex As Integer = 0
    Private imageList As New List(Of Image)
    [/highlight]

    Create the list
    [highlight=vb.net]

    'populate the list like this:
    imageList.Add(Image.FromFile("Filepathtoimage"))
    [/highlight]

    On the event:
    [highlight=vb.net]
    imageIndex += 1
    If Not(imageIndex < imageList.Length) Then imageIndex = 0
    If (imageList.Length > 0) Then PictureBox1.Image = imageList(imageIndex)
    [/highlight]

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  7. The Following User Says Thank You to Jason For This Useful Post:

    ♪~ ᕕ(ᐛ)ᕗ (06-01-2011)

  8. #7
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by Cho Chang View Post
    Create a List(Of Image), store all your images in there. On a given event step 1 more image through the list, it's not hard.

    Example:

    Create an instance variable:
    [highlight=vb.net]
    Private imageIndex As Integer = 0
    Private imageList As New List(Of Image)
    [/highlight]

    Create the list
    [highlight=vb.net]

    'populate the list like this:
    imageList.Add(Image.FromFile("Filepathtoimage"))
    [/highlight]

    On the event:
    [highlight=vb.net]
    imageIndex += 1
    If Not(imageIndex < imageList.Length) Then imageIndex = 0
    If (imageList.Length > 0) Then PictureBox1.Image = imageList(imageIndex)
    [/highlight]
    Easier than writing all dat shit above =P