<PAGE>   1

EXHIBIT *(10.40)

                          TRADEMARK SECURITY AGREEMENT

This Trademark Security Agreement ("Agreement") is made as of the 29th day of
October, 1999 by IGI, INC. ("Grantor"), a Delaware corporation, and successor by
merger to Vineland Laboratories, Inc. having a mailing address at Wheat Road and
Lincoln Avenue, Buena, NJ 08310, and delivered to AMERICAN CAPITAL STRATEGIES,
LTD., a Delaware corporation having a mailing address at 2 Bethesda Metro
Center, 14th Floor, Bethesda, Maryland 20814 ("Lender").

                                   BACKGROUND

A. Grantor has entered into that certain Note and Equity Purchase Agreement
dated as of even date herewith among Grantor, IGEN, Inc., ImmunoGenetics, Inc.,
and Blood Cells, Inc. (collectively, "Borrowers") and Lender (as it may
hereafter be supplemented, restated, amended, superseded or replaced from time
to time, the "Purchase Agreement"). Capitalized terms not defined herein shall
have the meanings given to such terms in the Purchase Agreement.

B. This Agreement is being executed contemporaneously with that certain Security
Agreement of even date herewith among Borrowers and Lender (as it may hereafter
be supplemented, restated, amended, superseded or replaced from time to time,
the "Security Agreement"), under which, inter alia, Grantor is granting Lender a
lien on and security interest in certain assets of Grantor associated with or
relating to products leased or sold or services provided under Grantor's
trademarks and the goodwill associated therewith as security for the payment and
performance of all the Obligations (as defined in the Security Agreement) of all
the Borrowers, and under which Lender is entitled to foreclose or otherwise deal
with such assets, trademarks, service marks and tradenames under the terms and
conditions set forth therein.

C. Pursuant to the Security Agreement, Lender is acquiring a lien on, and
security interest in, and license to use (which license is conditioned upon the
occurrence and continuance of an Event of Default) the trademarks, service marks
and trade names listed on Schedule "A" attached hereto (the "Trademarks"),
together with all the goodwill of Grantor associated therewith and represented
thereby, as security for all of the Obligations, and desires to have its
security interest in such Trademarks confirmed by a document identifying same
and in such form that it may be recorded in the United States Patent and
Trademark Office.

NOW THEREFORE, with the foregoing Background hereinafter deemed incorporated by
reference and made a part hereof, and in consideration of the premises and
mutual promises herein contained, the parties hereto, intending to be legally
bound hereby, covenant and agree as follows:

1.   In consideration of and pursuant to the terms of the Purchase Documents,
     and for other good, valuable and sufficient consideration, the receipt of
     which is hereby acknowledged, and to secure the payment and performance of
     all the Obligations,
<PAGE>   2
     Grantor grants a lien and security interest to Lender in all of its present
     and future right, title and interest in and to all service marks,
     trademarks, trademark and service mark registrations, trademark or service
     mark applications and trade names including, without limitation, the
     service marks, trademarks, trademark and service mark registrations,
     trademark or service mark applications and trade names listed on Schedule
     "A" hereto (the "Trademarks"), all of Grantor's rights and obligations
     pursuant to any license agreements between Grantor and any other Person or
     Persons with respect to any Patents, whether Grantor is a licensor or
     licensee under any such license agreements, including, without limitation,
     the licenses listed on Schedule "B" attached hereto and made a part hereof,
     and, subject to the terms of such licenses, the right to prepare for sale,
     sell and advertise for sale, all Inventory now or hereafter owned by such
     Assignor and now or hereafter covered by such licenses (collectively, the
     "Licenses"), together with all the goodwill of Grantor associated with and
     represented by the Trademarks, and the registration thereof and the right
     (but not the obligation) to sue for past, present and future infringements,
     and all proceeds thereof, including, without limitation, license royalties
     and proceeds of infringement suits (collectively the "Collateral").

2.   Grantor hereby covenants and agrees to maintain the Trademarks in full
     force and effect and otherwise perform all of its obligations and
     undertakings under this Agreement until all of the Obligations are
     indefeasibly paid and satisfied in full and the Security Agreement has been
     terminated.

3.   Grantor represents, warrants and covenants that:

     (a) The Trademarks are subsisting and have not been adjudged invalid or
unenforceable;

     (b) Each of the Trademarks is registered (or in the process of application
for registration), and, to the best of Grantor's knowledge, is valid and
enforceable;

     (c) Grantor is the sole and exclusive owner of the entire and unencumbered
right, title and interest in and to each of the Trademarks, and except for Liens
permitted under Section 7.2(b) of the Purchase Agreement, each of the Trademarks
is free and clear of any liens, claims, charges and encumbrances, including,
without limitation, pledges, assignments, options, and covenants by Grantor not
to sue third persons;

     (d) Grantor has the unqualified right, power and authority to enter into
this Agreement and perform its terms;

     (e) Grantor has complied with, and will continue for the duration of this
Agreement to comply with, the requirements set forth in 15 U.S.C.
Section1051-1127 and any other applicable statutes, rules and regulations in
connection with its use of the Trademarks;

     (f) Grantor has used and will continue to use for the duration of this
Agreement, consistent standards of quality in services or products leased or
sold under
<PAGE>   3
the Trademarks, and hereby grants to Lender and its employees and agents the
right (with no obligation of any kind upon Lender to do so) to visit Grantor's
affiliates, franchises or management locations and to inspect the use of the
Trademarks and quality control records relating thereto at reasonable times
during regular business hours to ensure Grantor's compliance with this paragraph
3(f); and

     (g) Grantor has no notice of any suits or actions commenced or threatened
against it, or notice of claims asserted or threatened against it, with
reference to the Trademarks.

4.   Grantor further covenants that:

     (a) Until all of the Obligations have been indefeasibly paid and satisfied
in full, Grantor will not enter into any agreement which is inconsistent with
Grantor's obligations under this Agreement or which restrict or impair Agent's
right or priorities hereunder.

     (b) If Grantor acquires rights to any new trademarks, the provisions of
this Agreement shall automatically apply thereto and such trademarks shall be
deemed part of the Trademarks. Grantor shall give Lender written notice promptly
upon its first use thereof along with an amended Schedule "A".

5.   So long as this Agreement is in effect and so long as Grantor has not
     received notice from Lender that an Event of Default has occurred and is
     continuing under the Notes or the Purchase Agreement and that Lender has
     elected to exercise its rights hereunder, Grantor shall continue to have
     the exclusive right to use the Trademarks and Lender shall have no right to
     use the Trademarks or issue any exclusive or non-exclusive license with
     respect thereto, or assign, pledge or otherwise transfer title in the
     Trademarks to anyone else.

6.   Grantor agrees not to sell, license, grant any option, assign or further
     encumber its rights and interest in the Trademarks without prior written
     consent of Lender or as may be expressly permitted under the Purchase
     Agreement. Notwithstanding the foregoing, and providing that no Default or
     Event of Default has occurred and is outstanding, Grantor shall be entitled
     to license any Trademarks in exchange for fair market consideration in the
     exercise of its reasonable business judgment.

7.   Following the occurrence and during the continuance of an Event of Default
     under the Notes or the Purchase Agreement, Lender, as the holder of a
     security interest under the Uniform Commercial Code, as now or hereafter in
     effect in the State whose law governs the interpretation of the Security
     Agreement, may take such action permitted under the Purchase Documents,
     hereunder or under any law, in its exclusive discretion, to foreclose upon
     or otherwise exercise its rights against the Trademarks covered hereby. For
     such purposes, Grantor authorizes and empowers Lender, its successors and
     assigns, and any officer or agent of Lender as Lender may select, in its
     exclusive discretion, as Grantor's true and lawful attorney-in-fact, with
     the power to endorse Grantor's name on all
<PAGE>   4
     applications, assignments, documents, papers and instruments necessary for
     Lender to use the Trademarks or to grant or issue any exclusive or
     non-exclusive license under the Trademarks to anyone else, or necessary for
     Lender to assign, pledge, convey or otherwise transfer title in or dispose
     of the Trademarks to anyone else including, without limitation, the power
     to execute on Grantor's behalf a trademark- assignment in the form attached
     hereto as Exhibit 1. Grantor hereby ratifies all that such attorney shall
     lawfully do or cause to be done by virtue hereof and in accordance with the
     terms hereof, except for the gross negligence or willful misconduct of such
     attorney. This power of attorney shall be irrevocable for the life of this
     Agreement, the Purchase Documents, and until all the Obligations are
     indefeasibly paid and satisfied in full and the Security Agreement is
     terminated.

8.   This Agreement shall not be modified without the written consent of the
     parties hereto.

9.   All rights and remedies herein granted to Lender shall be in addition to
     any rights and remedies granted under the Purchase Documents and shall be
     cumulative. In the event of an inconsistency between this Agreement and the
     Security Agreement, the language of the Security Agreement shall control.

10.  Upon full and unconditional satisfaction of all of the Obligations, Lender
     shall execute and deliver to Grantor all documents reasonably necessary to
     terminate Lender's security interest in the Trademarks.

11.  Any and all fees, costs and expenses, of whatever kind or nature, including
     the attorneys' fees and legal expenses incurred by Lender in connection
     with the preparation and execution of this Agreement and all other
     documents relating hereto, the filing or recording of any documents
     (including all taxes in connection therewith) in public offices, the
     payment or discharge of any taxes, reasonable counsel fees, maintenance
     fees, encumbrances or costs otherwise incurred in protecting, maintaining,
     preserving the Trademarks, or in defending or prosecuting any actions or
     proceedings arising out of or related to the Trademarks, or defending,
     protecting or enforcing Lender's rights hereunder, in each case in
     accordance with the terms of this Agreement, shall be borne and paid by
     Grantor on demand by Lender and until so paid shall be added to the
     principal amount of the Obligations and shall bear interest at the rate of
     interest determined in accordance with Section 8.2(c) of the Purchase
     Agreement.

12.  Subject to any applicable terms of the Security Agreement, Grantor shall
     have the duty to prosecute diligently any trademark application with
     respect to the Trademarks pending as of the date of this Agreement or
     thereafter to preserve and maintain all rights in the Trademarks, and upon
     reasonable request of Lender, Grantor shall make federal application on
     registrable but unregistered trademarks belonging to Grantor. Any
     reasonable expenses incurred in connection with such applications shall be
     borne by Grantor. Grantor shall not abandon any Trademark
<PAGE>   5
     without the prior written consent of the Lender, which consent shall not
     unreasonably be withheld.

13.  Grantor shall have the right to bring suit in its own name to enforce the
     Trademarks, in which event Lender may, if Grantor reasonably deems it
     necessary, be joined as a nominal party to such suit if Lender shall have
     been satisfied, in its sole discretion, that it is not thereby incurring
     any risk of liability because of such joinder. Grantor shall promptly, upon
     demand, reimburse and indemnify Lender for all damages, reasonable costs
     and expenses, including attorneys' fees, incurred by Lender in the
     fulfillment of the provisions of this paragraph.

14.  If an Event of Default is outstanding under the Notes or the Purchase
     Agreement, Lender may, without any obligation to do so, complete any
     obligation of Grantor hereunder, in Grantor's name or in Lender's name, but
     at Grantor's expense, and Grantor hereby agrees to reimburse Lender in full
     for all reasonable costs and expenses, including attorneys' fees, incurred
     by Lender in protecting, defending and maintaining the Trademarks.

15.  No course of dealing between Grantor and Lender nor any failure to
     exercise, nor any delay in exercising, on the part of Lender, any right,
     power or privilege hereunder, shall operate as a waiver thereof, and all of
     Lender's rights and remedies with respect to the Trademarks, whether
     established hereby or by the Purchase Documents, or by any other future
     agreements between Grantor and Lender or by law, shall be cumulative and
     may be exercised singularly or concurrently.

16.  The provisions of this Agreement are severable and the invalidity or
     unenforceability of any provision herein shall not affect the remaining
     provisions which shall continue unimpaired and in fall force and effect.

17.  This Agreement shall inure to the benefit of and be binding upon the
     respective successors and permitted assigns of the parties.

18.  This Agreement shall be governed by and construed in conformity with the
     laws of the State of Maryland without regard to its otherwise applicable
     principles of conflicts of laws.

19.  Grantor and Lender each waive any and all rights it may have to a jury
     trial in connection with any litigation, proceeding or counterclaim arising
     with respect to rights and obligations of the parties under this Agreement.

20.   THE OBLIGATIONS SECURED HEREBY AND THE SECURITY INTERESTS GRANTED
      HEREUNDER ARE SUBORDINATE IN THE MANNER AND TO THE EXTENT SET FORTH IN
      THAT CERTAIN SUBORDINATION AGREEMENT (THE "SUBORDINATION AGREEMENT")
      DATED AS OF OCTOBER 19, 1999, AMONG FLEET CAPITAL CORPORATION, AS AGENT
      FOR THE SENIOR LENDERS,
<PAGE>   6
     AMERICAN CAPITAL STRATEGIES, LTD., AND ASSIGNORS TO THE INDEBTEDNESS AND
     OTHER LIABILITIES OWED BY ASSIGNORS UNDER AND PURSUANT TO THE LOAN AND
     SECURITY AGREEMENT DATED AS OF OCTOBER 19, 1999, AND EACH RELATED "LOAN
     DOCUMENT" (AS DEFINED THEREIN), AND EACH ASSIGNEE HEREUNDER, BY ITS
     ACCEPTANCE HEREOF, ACKNOWLEDGES AND AGREES TO BE BOUND BY THE PROVISIONS OF
     THE SUBORDINATION AGREEMENT.
<PAGE>   7
IN WITNESS WHEREOF, the parties hereto have executed this Trademark Security
Agreement the day and year first above written.

                                    IGI, INC.



                                    By: /s/ Manfred Hanuschek
                                    Name: Manfred Hanuschek
                                    Title: CFO
<PAGE>   8
                            CORPORATE ACKNOWLEDGMENT



UNITED STATES OF AMERICA            :
STATE OF                            :     SS
COUNTY OF                           :

On this 29th of October, 1999, before me personally appeared __________________
to me known and being duly sworn, deposes and says that s/he is ________________
of IGI INC.; that s/he signed the Agreement thereto as such officer pursuant to
the authority vested in him by law; _______________ that the within Agreement is
the voluntary act of such corporation; and s/he desires the same to be recorded
as such.








                                    _____________________________________
                                    Notary Public

                                    My Commission Expires:
<PAGE>   9
                                    Exhibit I

                              TRADEMARK ASSIGNMENT

WHEREAS, IGI, INC. ("Grantor") is the registered owner of the United States
trademarks, tradenames and registrations listed on Schedule "A" attached hereto
and made a part hereof (the "Trademarks"), which are registered in the United
States Patent and Trademark Office; and

WHEREAS,                    ("Grantee" ), having a place of business at
               , is desirous of acquiring said Trademarks;

NOW THEREFORE, for good and valuable consideration, receipt of which is hereby
acknowledged, and intending to be legally bound hereby, Grantor, its successors
and assigns, does hereby transfer, assign and set over unto Grantee, its
successors, transferees and assigns, all of its present and future right, title
and interest in and to the Trademarks and all proceeds thereof and all goodwill
associated therewith issued under and pursuant to the Power of Attorney.

IN WITNESS WHEREOF, the undersigned has caused this Trademark Assignment to be
executed as of the 29th day of October, 1999.






                                    _____________________________________

                                    By: _________________________________

                                    Attorney-in-fact
<PAGE>   10
STATE OF                :

                        : S.S.

COUNTY OF               :



On this 29th day of October, 1999, __________________ before me, a Notary Public
for the said County and State, personally appeared known to me or satisfactorily
proven to me to be attorney-in-fact on behalf of IGI, INC. ("Grantor") and s/he
acknowledged to me that s/he executed the foregoing Trademark Assignment on
behalf of Grantor, and as the act and deed of Grantor for the purposes therein
contained.

IN WITNESS WHEREOF, I hereunto set my hand and official seal.





                                                 _______________________________
                                                          Notary Public







My Commission Expires:

__________________________________
<PAGE>   11
                                POWER OF ATTORNEY


IGI, INC., ("Grantor"), hereby authorizes AMERICAN CAPITAL STRATEGIES, its
successors and assigns, and any officer or agent thereof (collectively,
"Lender") as Grantor's true and lawful attorney-in-fact, with the power to
endorse Grantor's name on all applications, assignments, documents, papers and
instruments necessary for Grantee to enforce and effectuate its rights under a
certain Trademark Security Agreement between Grantor and Lender dated the date
hereof (as it may hereafter be supplemented, restated, superseded, amended or
replaced, the "Trademark Agreement", including, without limitation, the power to
use the Trademarks (as defined in the Trademark Agreement) and listed on
Schedule A attached hereto and made a part hereof, to grant or issue any
exclusive or nonexclusive license under the Trademarks to anyone else, or to
assign, pledge, convey or otherwise transfer title in or dispose of the
Trademarks, in each case subject to the terms of the Trademark Agreement.

This Power of Attorney is given and any action taken pursuant hereto is intended
to be so given or taken pursuant to and subject to the provisions of a certain
Loan and Security Agreement bearing even date herewith among Grantor and Leader,
as each document may be hereinafter supplemented, restated, superseded, amended
or replaced.

Grantor hereby unconditionally ratifies all that such attorney shall lawfully do
or cause to be done by virtue hereof and in accordance with the terms of the
Trademark Agreement.

This Power of Attorney shall be irrevocable for the life of the Trademark
Agreement.

IN WITNESS WHEREOF, the Grantor has executed this Power of Attorney, this 29th
day of October, 1999.

                                    IGI, INC.



                                    By:    /s/ MANFRED HANUSCHEK
                                    Name:  MANFRED HANUSCHEK
                                    Title: CFO