having problems with image.picture function

I did this program in Tech School for the air force...

Page 1 of 1

0 Replies - 882 Views - Last Post: 08 September 2008 - 06:08 PM Rate Topic: -----

#1 lassicrenol   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-September 08

having problems with image.picture function

Posted 08 September 2008 - 06:08 PM

I'm trying to recreate a program which i've lost all the code to, and it's been too long since i've worked on it, so here's what i want to accomplish. i'm wanting to pull .bmp files from a res file which i've assembled for my project. I have image boxes on the form in a square window from 0-155 in a control array. i want to read from a text file numbers which i've designated in the code for each res bitmap kinda like a paint by numbers and loop it to read from each designated number from a static numbered system in my text file. basically i'm making a map to move a character around with the text file and res file and image boxes. here's what i got so far... i probably ought to start from the basics here, but i figure you might be able to point me in the right direction.

Option Explicit
Dim counter As Integer
Dim MapPlace(0 To 155) As String
Dim MapPiece(0 To 8) As String
Private Sub Form_Load()

MapPiece(0) = "grass"
MapPiece(1) = "hills"
MapPiece(2) = "Town"
MapPiece(3) = "Mountain"
MapPiece(4) = "cave"
MapPiece(5) = "Tree"
MapPiece(6) = "water"

Open "c:\map.txt" For Input As #1
counter = 0
Input #1, MapPlace
Do Until EOF(1)

Image1(counter).Picture = LoadResPicture(MapPlace, vbResBitmap)
counter = counter + 1

End Sub

Is This A Good Question/Topic? 0
  • +

Page 1 of 1