Solved

Get the PATH of Picture

Posted on 1998-06-06
8
209 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
Comment Utility
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
Comment Utility
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
Comment Utility
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 5

Expert Comment

by:bin_huwairib
Comment Utility
dipal_shah,

Send your code to me at nakigany@hotmail.com

Bin Huwairib
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:EvanL
Comment Utility
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
Comment Utility
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 150 total points
Comment Utility
HI dipal_shah,

I hope you managed to solve it!!


Best regards
Bin Huwairib
0
 
LVL 1

Author Comment

by:dipal_shah
Comment Utility
Adjusted points to 150
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

762 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

12 Experts available now in Live!

Get 1:1 Help Now