Results 1 to 2 of 2

Thread: [RESOLVED] Setting a file path for a Image folder in my game.

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2012
    Location
    Georgia, USA
    Posts
    44

    Resolved [RESOLVED] Setting a file path for a Image folder in my game.

    This is my code for it. Im trying to Load the pic in a picBox by loading it from the application path and "\bin" and the picList.txt has to do with what gender the person choses. This is a ComboBox that im trying to apply this code to.

    Private Sub picList_Change()
    picBox.Image = LoadPicture(App.Path & "\images\avatars\" & picList.Text & ".jpg")
    End Sub




    Can anyone tell me how i would write that to make it work in VB.net?

  2. #2
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Setting a file path for a Image folder in my game.

    There's a bunch of ways you could put an image from a file into a picture box - any of these:

    Code:
    pBox.Image = Image.FromFile(filepath)
    pBox.Image = New Bitmap(filepath)
    pBox.ImageLocation = filepath
    pBox.Load(filepath)
    pBox.LoadAsync(filepath)
    BB

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