DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: insert picture

  1. #1
    Jill Guest

    insert picture


    how to insert a picture at run time?? how to make my code work??

    Private Sub mnuInsertPicture_Click()
    Dim intfile As Integer
    cmOpenFile.ShowOpen
    intfile = FreeFile
    Open cmOpenFile.FileName For Input As intfile

    Image1.Picture = LoadPicture("intfile")
    Close #intfile

    End Sub


  2. #2
    Jim Guest

    Re: insert picture


    Hi Jill,

    You might want to put the path of the file to display in the quotes.

    example..
    dim sPicture as string

    sPicture = app.path & "\intfile")
    Image1.Picture = LoadPicture(sPicture)

    This should work. Respond if it doesn't and well hash it again. Bye

    Jim

    "Jill" <gees07@yahoo.com> wrote:
    >
    >how to insert a picture at run time?? how to make my code work??
    >
    >Private Sub mnuInsertPicture_Click()
    >Dim intfile As Integer
    > cmOpenFile.ShowOpen
    >intfile = FreeFile
    > Open cmOpenFile.FileName For Input As intfile
    >
    >Image1.Picture = LoadPicture("intfile")
    >Close #intfile
    >
    >End Sub
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center