Results 1 to 6 of 6

Thread: Help!!!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    216

    Angry Help!!!

    Ok i want to load a picture from a file using MsRichtextbox control Code goes like this on load :

    rs.LoadFile ("d:background.txt")

    loaded1.Caption = loaded
    loaded = rs.Text
    Image1.Picture = LoadPicture(loaded)

    it works fine but i want to tell computer that if that file does not exists which in this case would be "background.txt" then image1.picture = i1.picure can any plz help me with this fast! and btw image1.picture = i1.picture works fine too just need to know how to get rid of error...if it gives error then load the image from gui

    thx in advance

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Help!!!

    check the file first..

    VB Code:
    1. If Len(Dir("D:\background.txt")) <> 0 then
    2.  
    3. Else
    4.  
    5. End if

    also u are missing the \ in your path
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Help!!!

    oh.. and Welcome to the forums!
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    216

    Re: Help!!!

    Quote Originally Posted by Static
    check the file first..

    VB Code:
    1. If Len(Dir("D:\background.txt")) <> 0 then
    2.  
    3. Else
    4.  
    5. End if

    also u are missing the \ in your path
    Thx sooo much! i owe u one

  5. #5
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Help!!!

    you can pay me back by going to the thread tools and click "Mark Thread Resolved"

    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    216

    Re: Help!!!

    Quote Originally Posted by Static
    you can pay me back by going to the thread tools and click "Mark Thread Resolved"

    lol deal

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