Solved

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

Posted on 2013-01-30
1
375 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
1 Comment
 

Accepted Solution

by:
elm9999 earned 0 total points
Comment Utility
Already solved

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

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now