Results 1 to 2 of 2

Thread: Why can't I load a picture?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    Post

    This won't work!
    On Error GoTo PATorJK
    CommonDialog1.CancelError = True
    CommonDialog1.Filter = "Image Files (*.bmp)|*.bmp"
    CommonDialog1.ShowOpen
    Open CommonDialog1.Filename For Input As #1
    Image1.picture = Input(LOF(1), #1)
    Close #1
    PATorJK: Exit Sub

    It won't open the picture!

    Steve

  2. #2
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355

    Post

    no ur right it won't, because
    Open.. Input.. Close
    they cant be used to get binary files, only text files (or any non binary file, eg, u can use open..close for word docs)
    anyway, do this:
    assuming u've got to the ShowOpen bit..

    Code:
    image1.picture = loadpicture(CommonDialog1.FileName)

    ------------------
    cintel rules www.cintelsoftware.co.uk

    [This message has been edited by KENNNY (edited 01-05-2000).]

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