Hello,
I need to a browse button to be able to open an image in the image control and also be able to get the path for the image...
Can anyone help...

Hello,
I need to a browse button to be able to open an image in the image control and also be able to get the path for the image...
Can anyone help...

Check out this sample project. look the screenshot also.
and tell me what do you think about it.

regards
Shouvik

Hello,
The form you sent thats fine maybe i will use it to display the images from different directories..
Anyway i have found a code for the browse button...

Option Explicit
'Add a CommonDialog control to your form.
'Project > Components > Controls tab > "Microsoft Common Dialog control" > OK
Private Sub Command1_Click()
    On Error GoTo MyError
    With CommonDialog1
        .CancelError = True
        .DialogTitle = "Common Dialog Example"
        .Filter = "Text files only (*.txt)|*.txt|All files (*.*)|*.*"
        .FilterIndex = 1
        .Flags = cdlOFNHideReadOnly Or cdlOFNOverwritePrompt Or cdlOFNPathMustExist
        .InitDir = App.Path
        .ShowSave
    End With
    'Do your save stuff here
    'Use the CommonDialog1.FileName property to get the full path and file name selected
    '
    Exit Sub
MyError:
    If Err.Number <> cdlCancel Then
        MsgBox Err.Number & " - " & Err.Description, vbOKOnly + vbExclamation, "Save"
    End If
End Sub

Now i want to display the path in a textbox...
Can anyone help how we can get the path...
That is when i have selected a file form a directory, the path should be displayed automatically in a text box..

Hello,
I managed to solve the problem...
I use

Text1.Text = CommonDialog1.FileName

and that solved the problem...

I'm doing a data entry program that allows to enter the name, address, contact number, organization, pecinct number, and also a picture.
The problem is.

I need a browse button for picture that will enter into a picture box control or image box control

and also to input the picture into a database (MS Access)

and also retrieve the picture back to the picture box control

or image control

the output of the program is like an Identification Card

containing the picture, name, address, etc.

My connection into the database is OLEDB.

I'm also using Adodc as my data input and data retrieve.

I hope guys that you can help me about this

Thank you very much ^_^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.