Loading picture from file with browse button on VB6

Discussion in 'Visual Basic ( VB )' started by masterpee, Aug 27, 2010.

  1. masterpee

    masterpee New Member

    Joined:
    Aug 27, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    student
    Location:
    Nigeria
    Add common dialog control tool 6.0 from component
    Drag it to your form interface
    Draw a Picture box
    Name it at the property bar as dialog1
    create a text box and name the text box as txtpicture
    Create a command botton
    Double click on the command botton

    here is the code:
    private sub command1_click()
    dialog1.showopen
    txtpicture.text = dialog1.FileName
    Picture1.picture = Loadpicture (txtpicture.text)
    end sub

    Try it and find it real..........
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice