Results 1 to 2 of 2

Thread: Need to transfer to resources

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2021
    Posts
    41

    Need to transfer to resources

    Hi, my project needs certain images to work properly, so far I am only able to get them to work when in an external folder, I want to move them (the images) to the resources file. This is what I currently have in code.

    Code:
     If k > 0 Then
                                                    Tile.Image = New Bitmap("data/tiles/tile_" & TileState(0, x, k - 1) & ".png")
                                                    TileState(0, x, k) = TileState(0, x, k - 1)
                                                Else
                                                    Tile.Image = New Bitmap("data/tiles/tile_0.png")
                                                    TileState(0, x, k) = 0
                                                End If
    What I have tried is

    Code:
     While My.Resources.ResourceManager.GetObject("_" + CStr(maxn) + ".png") And scnt <= 31
                scnt += 1
                img(scnt) = Image.FromFile("_" + CStr(maxn) + ".png")
                maxn *= 2
            End While
            If maxn <= 2048 Then
                MsgBox("Missing base map _" + CStr(maxn) + ".png", vbOKOnly + vbExclamation, "hint")
                Me.Close()
            End If
    But that doesn't work
    Last edited by Yourmomsfire; Sep 5th, 2021 at 11:50 PM.

Tags for this Thread

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