Solved

how to get a picture file from a server folder using vb6

Posted on 2013-01-30
1
382 Views
Last Modified: 2013-01-30
Hi guys,

I'm working in an application that works like a contacts and each one has a its own picture face, the aplication already select the picture, show it on the form, rename it and save it in a server folder, the rest of the information is saved in a MySQL Database.

Each record has its own Id key number so, the picture is renamed with the same Id Key number.

Now I need to edit the record and show the corresponding picture image on the form.

This is the code to save the file:

    If lSihayfoto = True Then
        rsFotos!Consecutivo = (nCveFoto + 1)
        rsFotos.Update
        rsFotos.Close
        '***** LA SIGUIENTE RUTINA COPIA, RENOMBRA Y GUARDA LA FOTO EN C:\CCIME\Temp *****
        '***** DESPUES LA GUARDA EN EL SERVIDOR YA RENOMBRADA CON EL NUMERO CONSECUTIDO DE FOTOS *****
        cString = Trim(txtBuscaFoto.Text)
        Name cString As "C:\CCIME\Temp\" & Format(cCveFoto, "0000") & ".jpg"
        Set oFSO = CreateObject("Scripting.FileSystemObject")
        oFSO.GetFile("C:\CCIME\Temp\" & Format(cCveFoto, "0000") & ".jpg").Copy "\\EXTLANSBS05\FotosCCIME\", True
        Kill "C:\CCIME\Temp\" & Format(cCveFoto, "0000") & ".jpg"
    End If

Now I need to get the Picture file to show it on edit-from.

Any suggestions?

Thank you so much guys.
0
Comment
Question by:elm9999
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
elm9999 earned 0 total points
ID: 38836914
Already solved

cString = "\\EXTLANSBS05\FotosCCIME\" & Format(cCveFoto, "0000") & ".jpg"
Image1.Picture=Loadpicture(cString)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sumDigits challenge 9 172
post4 challenge 28 113
canBalance challenge 34 104
Excel file not created as expected 7 90
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question