Results 1 to 4 of 4

Thread: codes

  1. #1

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    You're not being very precise here.
    So I'll assume this is what you're looking for :

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.     Picture1.Picture = LoadPicture("c:\jamie\carlos1.jpg")
    5.     Picture1.Picture = LoadPicture("c:\jamie\katie and pippa .jpg")
    6.     Picture1.Picture = LoadPicture("c:\jamie\desktop.jpg")
    7. End Sub
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  2. #2
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Nope, I think that's not what he wants

    Here's some code to switch two images. I'll assume picTemp is a blank image (invisible!) that we can use in our function

    VB Code:
    1. Private Sub SwitchPictures(Pic1 As PictureBox, Pic2 As PictureBox)
    2.     picTemp.Picture = Pic1.Picture
    3.     Pic1.Picture = Pic2.Picture
    4.     Pic2.Picture = picTemp.Picture
    5. End Sub

    Ok, put this somewhere in your form. To switch 2 pictureboxes, lets say, Picture6 and Picture11, you'd use this: SwitchPictures Picture6, Picture11

    That should work
    Last edited by Jotaf98; Aug 27th, 2001 at 12:15 PM.
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  3. #3

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Could have been looking for my code tho
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  4. #4
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    "Switch from image to image" doesn't sound like "Load an image"

    But yes, that could be a way of switching the images
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width