Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Images wont show on UI


coolmagicdude2
 Share

Recommended Posts

I changed the inventory to be separate from the rest of the mini menus, it works like a charm but the image i made for it wont show!
Please help heres the code
```
Private Sub Form_Load()
    Dim i As Long
    Dim Ending As String

    For i = 1 To 4
        If i = 1 Then Ending = ".gif"
        If i = 2 Then Ending = ".jpg"
        If i = 3 Then Ending = ".png"
        If i = 4 Then Ending = ".bmp"

        If FileExists("GUI\800X600" & Ending) Then
            frmMirage.Picture = LoadPicture(App.Path & "\GUI\800X600" & Ending)
        End If
        If FileExists("GUI\Inventory" & Ending) Then
            picInventory.Picture = LoadPicture(App.Path & "\GUI\Inventory" & Ending)
        End If
    Next i
End Sub
```
"gui/inventory" is the picture i made for the inventory window

Im fairly noobish with VB but i can find my way around it by now so i tought i'd try my hand at sourcing. Please be gentle with the flaming?  XD
Link to comment
Share on other sites

I changed the inventory to be separate from the rest of the mini menus, it works like a charm but the image i made for it wont show!
Please help heres the code
```
Private Sub Form_Load()
    Dim i As Long
    Dim Ending As String

    For i = 1 To 4
        If i = 1 Then Ending = ".gif"
        If i = 2 Then Ending = ".jpg"
        If i = 3 Then Ending = ".png"
        If i = 4 Then Ending = ".bmp"

        If FileExists("GUI\800X600" & Ending) Then
            frmMirage.Picture = LoadPicture(App.Path & "\GUI\800X600" & Ending)
        End If
        If FileExists("GUI\Inventory" & Ending) Then
            picInventory.Picture = LoadPicture(App.Path & "\GUI\Inventory" & Ending)
        End If
    Next i
End Sub
```
"gui/inventory" is the picture i made for the inventory window

Im fairly noobish with VB but i can find my way around it by now so i tought i'd try my hand at sourcing. Please be gentle with the flaming?  XD
Link to comment
Share on other sites

@The:

> We won't flame you.

lol, nah jk ^^.

Remove or comment:
```
        If FileExists("GUI\Inventory" & Ending) Then
            picInventory.Picture = LoadPicture(App.Path & "\GUI\Inventory" & Ending)
        End If
```Place this under:
```
picInventory.Picture = LoadPicture(App.Path & "\GUI\Inventory.XextX
```Replace '.XextX' with the extension of the file (if its png, get a support or re-make the image on another format).

Comments,
From: Zananok
Link to comment
Share on other sites

@The:

> We won't flame you.

lol, nah jk ^^.

Remove or comment:
```
        If FileExists("GUI\Inventory" & Ending) Then
            picInventory.Picture = LoadPicture(App.Path & "\GUI\Inventory" & Ending)
        End If
```Place this under:
```
picInventory.Picture = LoadPicture(App.Path & "\GUI\Inventory.XextX
```Replace '.XextX' with the extension of the file (if its png, get a support or re-make the image on another format).

Comments,
From: Zananok
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...