• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Image producing

Hello Experts,

I am using visual basic 6.0 on micrisoft XP platform...having not much Idea about using VB 6.

But ,I have created direct buttons and some text area's,filled up informnation and now I would like to have Images in front of those buttons.

important is ,how I will see image in image box not the file path..

(everytime when I change information I can see the same picture not appropriate to information.)

Will you please tell me how to do it?

  • 3
  • 3
1 Solution
racheleeAuthor Commented:
Hello Again,

Now I am able to see the file name in the image box, and when I click on it then only i am able to see an image ,
but I would like to see it without clicking....Infact i would not like to see file name but picture.

please need ur help

best regards
I've read that 5 times and I'm not still not sure what you're asking. Maybe I'm just very sleepy.. :-(

I normally don't ask this, but could you upload a screenshot of your form?
racheleeAuthor Commented:
Yes I can explain again,

I have some data in front of that I want to have the appropriate picture for that specific data.

I am able to do it , but i can't see the picture in the box but file,
will u please help me having direct picture in the box and not the file name where picture is saved...

when I click on file name in the box , I am able to see picture from   microsoft picture.

please ask me againg if u do not understand yet


Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

It'd probably help me understand your goal if you uploaded a screenshot (picture) of your form so I can see it. I'm having difficulty understanding the terms you're using.

If you can't do that, then what exactly are you trying to do?

Here are examples of loading a picture into a PictureBox control:

Private Sub Command1_Click()
    'load the picture from Text1.Text ("c:\test.bmp")
    Set Picture1.Picture = LoadPicture(Text1.Text)
End Sub
Private Sub Command2_Click()
    'load the picture directly from path
    Set Picture1.Picture = LoadPicture("c:\test.bmp")
End Sub

This one will load pictures selected from a FileListBox:

Private Sub File1_Click()
    'check file extension.. only allow BMPs
    If StrComp(Right$(File1.FileName, 4), ".bmp", vbTextCompare) = 0 Then
        Set Picture1.Picture = LoadPicture(File1.Path & File1.FileName)
    End If
End Sub
Private Sub Form_Load()
    File1.Path = "c:\"
End Sub
racheleeAuthor Commented:
I have a screen like below

 directory path of picture

specification 1               data 1                               picture box>>in which i can see again path but i would like to see an  image

specification 2               data 2                                And whenever I change data , specification and path of image in the next                                                                      page , the related picture should come next page.

specification 3               data 3

I hope r following now, what i want.

thnx a lot

>> picture box>>in which i can see again path but i would like to see an  image
I'm not clear on that.

Why is the "path" displayed in the PictureBox? What control is used for "directory path"? Have you properly resized/moved the controls so they're not covering eachother?

If you're new to VB, you might want to familiarize yourself with it a little and ask smaller questions. It's difficult for me to suggest anything right now for something unclear and broad.

I'm heading out right now so I'll respond later today unless somebody else answers your question. As for the screenshot, I meant for you to take an actual picture of how your form looks... it'd really help for others and myself to help you.
Ryan ChongCommented:
>>now I would like to have Images in front of those buttons.
If you're using standard command buttons, you can try change its Style Property to 1 - Graphical, and then at the Picture Property click the "[...]" button (when you focused on that Property) to select an image. If you want to load the image dynamically, you can try use the LoadPicture function as what zzzzzooc mentioned above.

Let us know if you need further helps here.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now