Results 1 to 4 of 4

Thread: Whats wrong with this image thingy

  1. #1

    Thread Starter
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188

    Whats wrong with this image thingy

    Hey all,
    Using an image box what wrong with doing this?

    Dim strpic As String
    strpic = File1.Path & "\" & File1.FileName
    img.Picture = strpic

    I get the error "Type Mismatch"
    Anyone?

  2. #2
    Frenzied Member
    Join Date
    Aug 2001
    Posts
    1,075
    I think it is LoadPicture as in

    img.Picture = LoadPicture (strpic)

    Greg
    Free VB Add-In - The Reference Librarian
    Click Here for screen shot and download link.

  3. #3
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    The Picture property is an object, not a string. Use the LoadPicture() function to put a picture into the control.
    VB Code:
    1. img.Picture = LoadPicture(strpic)
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

  4. #4

    Thread Starter
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    I'm so stupid.
    I did this b4 but forgot and also when i did a search i typed imge instead of image!

    One of those days!

    Thanks heaps guys!

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