(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
09-27-24 10:20 PM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - Loading Images in VB6 New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
KeiiChi Kun

Leever
Learn some manners.
Password changed to gibberish and IP banned.


 





Since: 01-01-06
From: Sushi Bar

Last post: 6444 days
Last view: 6444 days
Posted on 07-23-06 02:52 PM Link | Quote
I was working on a Map Editor, but I fucked up the entire tile loading system, so I scraped it. Now I wanna know how to load a certain image depending on the value of a certain offset (for obvious reasons) in VB6. Any input would be good, thanks.
Sukasa

Birdo
Not quite as active as before.
Xkeeper supporter
Xk > ||bass
I IP Banned myself! Twice!








Since: 11-17-05
From: Somewhere over there

Last post: 6432 days
Last view: 6430 days
Posted on 07-23-06 03:02 PM Link | Quote
Select Case Offset
Case 0
Image1.picture = loadpicture(image1filename)
case 1
Image1.picture = loadpicture(image2filename)
.
.
.
End Select.

Is this example, Offset ithte name of a variable, and image1 is the example imagebox control that would be modified

And if you need an offset form a file, "Get #1, xxxx, Offset" will work. #1 is the file number of a file opened with "Open filename for Binary As #1" or any other number, and xxxx is the offset in the file.
KeiiChi Kun

Leever
Learn some manners.
Password changed to gibberish and IP banned.


 





Since: 01-01-06
From: Sushi Bar

Last post: 6444 days
Last view: 6444 days
Posted on 07-24-06 01:40 PM Link | Quote
Thanks a lot
Sukasa

Birdo
Not quite as active as before.
Xkeeper supporter
Xk > ||bass
I IP Banned myself! Twice!








Since: 11-17-05
From: Somewhere over there

Last post: 6432 days
Last view: 6430 days
Posted on 07-24-06 02:08 PM Link | Quote
You're welcome

And, if you are using the resource editor add-in (I'm assuming you're using something like VB6 Professional or whatever and have access to that via the add-ins menu), you can access images in the resource file with the line

"LoadResPicture(PictureID)", or something along those lines, replacing PictureID with the ID of the image you want to laod, which makes my first example become
Select Case Offset
Case 0
Image1.picture = LoadResPicture("image1")
case 1
Image1.picture = LoadResPicture("image2")
.
.
.
End Select.
KeiiChi Kun

Leever
Learn some manners.
Password changed to gibberish and IP banned.


 





Since: 01-01-06
From: Sushi Bar

Last post: 6444 days
Last view: 6444 days
Posted on 07-24-06 02:21 PM Link | Quote
:O Thanks! This is great, it means I don't have to have a bulky folder full of tiles, thanks again.
Sukasa

Birdo
Not quite as active as before.
Xkeeper supporter
Xk > ||bass
I IP Banned myself! Twice!








Since: 11-17-05
From: Somewhere over there

Last post: 6432 days
Last view: 6430 days
Posted on 07-24-06 04:38 PM Link | Quote
You're welcome

I'm pretty good with most of VB6 (Well, 'cept microsoft ocntorls tha tdon't function correctly), so I can help you if you need it.
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - Programming - Loading Images in VB6 |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.011 seconds; used 374.84 kB (max 452.34 kB)