CJ7
CJ7

Reputation: 23275

How to determine whether embedded resource exists?

My VB6 product may or may not have an embedded resource included in the executable.

What VB6 code would determine whether a certain embedded resource exists?

Upvotes: 0

Views: 209

Answers (1)

Ken White
Ken White

Reputation: 125708

It depends on the kind of resource. VB6 has three different LoadRes<type> functions, and the proper one to use depends on the resource type. For instance, to load an image resource you use LoadResPicture. (There are links to the other functions in the tree menu on the left side of the linked page.)

Call the appropriate function, and if it returns the proper resource it's there. Handle the error if it's not, and you should be set.

This article may help.

Upvotes: 1

Related Questions