Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Get the PATH of Picture

Posted on 1998-06-06
8
Medium Priority
?
217 Views
Last Modified: 2010-05-03
Basically i am trying to implement a ActiveX control which will accept Picture form the user and will display that picture on the control.

My problem,
I have a picture loaded on a form at design time of the ActiveX control and i want to extract the path of that BMP. How can i do that ? Also if you can help how to put BMP selection dialog in the properties menu.

msgbox Form1.Picture 'will return some interger which will not work.


Thanks
Dipal
dipal_shah@hotmail.com
0
Comment
Question by:dipal_shah
8 Comments
 
LVL 1

Expert Comment

by:juliocoelho
ID: 1462679
Sorry, but you cannot extract the path of that picture.

When you put a picture into a picture component in design time VB saves that picture with the form, in the .frx file. Because of that you cannot get the path of that picture, for VB that picture doesn't exist in your file system, but in VB itselt.

With kind regards
0
 
LVL 1

Author Comment

by:dipal_shah
ID: 1462680
juliocoelho,

Sorry i can't give you point for that.

Basically i have make my usercontrol. I have make one property as Picture. Now my user will write path in that property so i will need to extract that path and have to let my usercontrol know about that.  I think this bit more clear.

If anyone wants to work on it more i can send you my code of usercontrol and help me on that.

dipal
0
 
LVL 1

Author Comment

by:dipal_shah
ID: 1462681
Basically i have make my usercontrol. I have make one property as Picture. Now my user will write path in that property so i will need to extract that path and have to let my usercontrol know about that.  I think this bit more clear.

If anyone wants to work on it more i can send you my code of usercontrol and help me on that.

dipal

0
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!

 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1462682
dipal_shah,

Send your code to me at nakigany@hotmail.com

Bin Huwairib
0
 
LVL 1

Expert Comment

by:EvanL
ID: 1462683
I do the same thing, but with a database.  The trick is having the user select the picture path, and then saving that path into a textbox's .text property.  Then you can define the path as a global variable, and call it from wherever in your program.  When the program starts, you can make them click a Browse button and select the picture's path.  
0
 
LVL 1

Author Comment

by:dipal_shah
ID: 1462684
Evanl,
I have got the perfect answer as i wanted from  bin_huwairib. He has solved my problem with some other technique which no more requires file name.

Anyway thanks a lot for commenting. I am waiting till he claims for the points.

Dipal
0
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 600 total points
ID: 1462685
HI dipal_shah,

I hope you managed to solve it!!


Best regards
Bin Huwairib
0
 
LVL 1

Author Comment

by:dipal_shah
ID: 1462686
Adjusted points to 150
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

963 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