Solved

Dynamically load file in Visual Basic 6 add-in project

Posted on 2007-03-30
4
359 Views
Last Modified: 2008-01-09
Hi there,

I've just written an add-in for Outlook in visual Basic 6 and I want this add-in, among other things, to dynamically load files (more precisely gif images intended to be put in picture boxes).
How can I do that ?

I read that the location of the add-in dll was written in the registry once the add-in is registered but I didn't find it.

Other possibility : include the gif files in the project as related documents.
But then, how can I refer to them in the code ?

Thanks in advance
0
Comment
Question by:B_B_Boris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 32

Expert Comment

by:Robberbaron (robr)
ID: 18828077
I thought if you loaded them into a Image Strip they compiled with the project.

cant find ImageStrip control at the moment though.
0
 
LVL 13

Expert Comment

by:Mark_FreeSoftware
ID: 18830855

or you could include them as resources, and extract at runtime :)

0
 

Author Comment

by:B_B_Boris
ID: 18842710
Thank you for your posting.

I've just tried to include an image as a resource.

The problem is that it cannot be a bitmap, it has to be a gif file : When I try to save my gif file as a bitmap, the background turns black even though it was transparent in the gif.

I tried to create a "custom" resource but when I write
    Img_phone.Picture = LoadResData(101, "CUSTOM")
in the code, I get an error message saying "Execution error 424 : An object is required"

???
0
 
LVL 13

Accepted Solution

by:
Mark_FreeSoftware earned 500 total points
ID: 18844420

loadresdata will not work in this case


you have 2 options:

1 (recommended, much easier)
extract the resource to a temporarily file, and load that file in your picturebox

2(not recommended, hard)
create a picture in memory, and copy the data into that
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

726 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