|
-
Jun 4th, 2002, 09:56 PM
#1
Thread Starter
Lively Member
Images
Hey i have a whole bunch of images that i would like to include in my project. Is there a way that when a person clicks a button an image apears in the middle of the form... for each button they press. so that each image over laps the next. With out writing a whole bucnh of .show or .visible code?
thanks
•º£ëÖº•

____________________________
If you run alot no matter if you like to or not, it grows on you.... Visual basic has yet to grow on me!

-
Jun 4th, 2002, 09:58 PM
#2
The picture isn't missing
change the zorder to 0 of the object, like
Picture1.ZOrder 0
will move it to topmost
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jun 4th, 2002, 10:06 PM
#3
Thread Starter
Lively Member
I'm not sure what you mean... i made like a file menu on top of the program... i dont even know how to bring the pic in.. what type of OLE to use.
•º£ëÖº•

____________________________
If you run alot no matter if you like to or not, it grows on you.... Visual basic has yet to grow on me!

-
Jun 4th, 2002, 10:13 PM
#4
The picture isn't missing
i dont understand what you mean. post a ascreenshot
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jun 4th, 2002, 10:50 PM
#5
Thread Starter
Lively Member
i dont have anything to post.. lol.
okay here. I have like 8 images. They are in a folder and i want to use them in my vb project. When someone clicks a menu button i want the image to display on the form that the menu bar is on. Like under the menu bar and centerd. Then when they click another button for another image... another one pops up in that area etc etc
http://members.cox.net/alexandertheg...screenshot.jpg
•º£ëÖº•

____________________________
If you run alot no matter if you like to or not, it grows on you.... Visual basic has yet to grow on me!

-
Jun 4th, 2002, 11:02 PM
#6
place the images inside an imagelist control, then you can create dinamycally some imageboxes, and show the pics from the imagelist inside that/them..
VB Code:
Private MyPicBox As PictreBox
Sub Trick()
Set MyPicBox = Form1.Controls.Add("VB.PictureBox","_MyPicBox")
'then you can use this like a design time created picturebox..
With MyPicBox
set .Picture = ...
End With
End Sub
Jim.
-
Jun 5th, 2002, 12:02 AM
#7
Thread Starter
Lively Member
i cant find the image list control... where is it?
•º£ëÖº•

____________________________
If you run alot no matter if you like to or not, it grows on you.... Visual basic has yet to grow on me!

-
Jun 5th, 2002, 12:27 AM
#8
PowerPoster
I get the feeling you want something simple here.
Just ad a Picturebox to the middle of your form and in each button write code like this.
VB Code:
Private Sub Command1_Click()
Dim Pic As New StdPicture
Set Pic = LoadPicture("C:\windows\desktop\First.jpg")
Call Picture1.PaintPicture(Pic, 0, 0, Picture1.Width, Picture1.Height)
Set Pic = Nothing
End Sub
Private Sub Command2_Click()
Dim Pic As New StdPicture
Set Pic = LoadPicture("C:\windows\desktop\Second.jpg")
Call Picture1.PaintPicture(Pic, 0, 0, Picture1.Width, Picture1.Height)
Set Pic = Nothing
End Sub
Where LoadPicture is the path of your picture.
Last edited by Arc; Jun 5th, 2002 at 12:31 AM.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|