We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Image producing

rachelee
rachelee asked
on
Medium Priority
185 Views
Last Modified: 2010-04-07
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?

Comment
Watch Question

Author

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
Rachel

Commented:
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?

Author

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

regards
Rachel

Commented:
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

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
Rachel

Commented:
>> 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 ChongSoftware Tead Lead / Business Analyst / System Analyst / Data Engineer
CERTIFIED EXPERT

Commented:
>>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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.