Results 1 to 6 of 6

Thread: Picture Source

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Posts
    225
    Hi all,

    How could I get the short name of a picture? (without the directory info)

    I tried ImageMenu1.Picture = ImageMenu1Name but it recovered a number. I have the image Dim-ed as an Object, so what do I do? It has to be an Object, I have no alternative.

    Thanks. =)

    -Git

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    This will return the short name of a file.

    Code:
    shortName = Right$(strfullname, Len(strfullname) - InStrRev(strfullname, "\"))
    Iain, thats with an i by the way!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Posts
    225
    Thanks. But how do I recover the filname? I try but I keep getting a number (it's an image).

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Posts
    225

    Unhappy

    I mean, I can't recover ANY of the filename, I only get a number..

    Please help! =(

  5. #5
    Guest
    What do you mean by getting filename? Do you want to get it from the path? (C:\Windows\MyPic.bmp) or do you want to get it from a PictureBox that already has a Picture loaded?

    If you want to get it from the PictureBox, I don't think you can. The pixels have already been drawen and I don't think there is any reference to the original filename in it.


  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Posts
    225
    Yeah, I meant getting the filename of the pic that's been drawn.

    Ahwell, gotta redesign part of the prog then.

    Thanks. =)

    -Git

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