Author Topic: Picturebox load  (Read 5682 times)

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Picturebox load
« on: January 08, 2006, 03:08:07 AM »
is it possible to set like
Code: [Select]
pic(0 to 100) as pictureboxand then use it to store pictures loaded from the hardrive? ive tried but it just complains, and if it does work how do I do? or do I have to create picture box after picturebox to store them all as I program?
« Last Edit: January 08, 2006, 03:12:12 AM by Zelos »
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Picturebox load
« Reply #1 on: January 08, 2006, 03:09:33 AM »
I'm not sure exactly what you're asking.  What are you trying to do?

Offline Ulciscor

  • Bot Destroyer
  • ***
  • Posts: 401
    • View Profile
Picturebox load
« Reply #2 on: January 08, 2006, 05:32:30 AM »
If you mean can you load an array of pictureboxes at runtime as an array then yes I think you can. This is easier than actually making 101 pictureboxes and loading pictures into them at design time, as you say.

This link may help:

http://www.vbwm.com/art_1999/whatsnew/dynctrl.asp
:D Ulciscor :D

I used to be indecisive, but now I'm not so sure.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Picturebox load
« Reply #3 on: January 08, 2006, 02:49:22 PM »
Try using an "image" object at design time. This remains invisible but acts as an array that can store pictures. You can load them into it at either design time or run time.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Picturebox load
« Reply #4 on: January 09, 2006, 02:04:35 AM »
hmm, is it possible to store pics without having a equal amount of images?
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Picturebox load
« Reply #5 on: January 12, 2006, 01:04:36 PM »
is it possible in vb to mirror a picture so the sides changes?
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Picturebox load
« Reply #6 on: January 14, 2006, 07:48:39 AM »
the array thing have ive solved, what about mirrir effect?
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Picturebox load
« Reply #7 on: January 14, 2006, 12:26:41 PM »
Not quite sure what you mean. Can you explain a little?
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Picturebox load
« Reply #8 on: January 14, 2006, 02:05:19 PM »
just a effect that makes the mirror effect of a pic, left becomes right and right becomes left
Code: [Select]
Private Declare Function BitBlt Lib "gdi32.dll" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal width As Long, ByVal height As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Const sp_width = 8
Const sp_height = 5

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim p(1 To 2) As StdPicture
Set p(2) = LoadPicture("C:\Documents and Settings\Pelle\Mina dokument\RPG\General Items\Bottle Liquids\Blod.gif")

x = Form1.width / 2
y = Form1.height / 2
   'BitBlt Form1.hDC, x, y, sp_width, sp_height, Image1.Picture, 0, 5, vbSrcAnd
  'BitBlt Form1.hDC, x, y, sp_width, sp_height, Image1.Picture, 0, 0, vbSrcPaint
BitBlt Form1.hDC, x, y, sp_width, sp_height, p(2).hDC, 0, 0, vbSrcCopy
End Sub

ive created this code, it just complain, why? can someone tells me what im doing wrong?
you migiht need to change the path of the file. here is the file anyhow
« Last Edit: January 14, 2006, 02:09:18 PM by Zelos »
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Picturebox load
« Reply #9 on: January 15, 2006, 11:06:29 AM »
Using BitBlt eh?

That is fairly advanced programming. Congratulations on getting this working at all. It took me ages to get BitBlt to work in any programs and I still don't fully understand all its capabilities.
I haven't ever tried to use a mirror effect so I can't really help you without researching it a little myself first.

Are you getting the main picture to work properly with the BitBlt function? What exactly happens that is not right?
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Picturebox load
« Reply #10 on: January 15, 2006, 11:20:58 AM »
when I put the image in a picture box it worx. but if I load it and store its as a array it doesnt, I just need to get it to be able to read from the stored array
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Picturebox load
« Reply #11 on: January 15, 2006, 04:51:49 PM »
You should try and find a VB game programming forum to help you.  You're fast approaching the edge of our expertise (DB didn't really do much advanced graphics programming).

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Picturebox load
« Reply #12 on: January 15, 2006, 07:16:03 PM »
try gamedev.net

There are some very useful tutorials there.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D