?
Solved

Dynamically load file in Visual Basic 6 add-in project

Posted on 2007-03-30
4
Medium Priority
?
368 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 1500 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

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!

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

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