Results 1 to 6 of 6

Thread: Image Boxes

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    158

    Image Boxes

    to load an image to an image box u use

    PHP Code:
    imgnextquestion.Picture LoadPicture("C:\Windows\Button - Next Question.gif" 
    but i need to identify the image in the box so
    if i use
    Code:
    If imgnextquestion.Picture = LoadPicture("C:\Windows\Button - Next Question.gif" then
    msgbox "hello"
    end if
    it doesnt work
    can u use like
    imgnextquestion.pciture = button - next question

    or sumthing
    pls help

    this is what i have and it doest work
    Code:
    If (imgcheck.Visible = True) And (imgnextquestion.Picture = LoadPicture("C:\Windows\Button - Next Question.gif")) Then
    MsgBox "Please Click Next Question!", vbInformation, "Info Message"
    ElseIf imgnextquestion.Picture = LoadPicture("C:\Windows\Button - Next Question.gif") Then
    lbldisplay.Caption = "You have Selected Option B, Click 'Check Answer'"
    ElseIf imgnextquestion.Picture = LoadPicture("C:\Windows\button - begin.gif") Then
    MsgBox "Please click Begin"
    End If
    thanks Trav

  2. #2
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    i would suggest placing the path in the Tag property (image2.Tag=Path) and then see if the TAG of the IMAGE CONTROL is the picture you want. you dont even need to have the path in there, it could be like "greendot" or "yellow snow"
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    158
    yeaa i know
    i do have it in the properties
    but the image has to change during the game
    so thats y i ahve made it load from HD

  4. #4
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    yah, so when you load the new picture you just put the path in the Tag property............. jeez
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    158
    nahh thats not what i mean
    how can i get thsi code to work

    Code:
    If (imgcheck.Visible = True) And (imgnextquestion.Picture = LoadPicture("C:\Windows\Button - Next Question.gif")) Then
    MsgBox "Please Click Next Question!", vbInformation, "Info Message"
    ElseIf imgnextquestion.Picture = LoadPicture("C:\Windows\Button - Next Question.gif") Then
    lbldisplay.Caption = "You have Selected Option A, Click 'Check Answer'"
    ElseIf imgnextquestion.Picture = LoadPicture("C:\Windows\Button - Begin.gif") Then
    MsgBox "Please click Begin"
    End If

  6. #6
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    you wont be able to. loadpicture returns the position of the picture in the ram. it really is impossible.

    you will need to either use my idea, or something else.
    Remember, if someone's post was not helpful, you can always rate their post negatively .

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