Results 1 to 9 of 9

Thread: How do I load a dll for use in VB?

  1. #1

    Thread Starter
    Hyperactive Member Abdulrahman's Avatar
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    281
    I have VB6 installed here on WinMe, I tried to import riched20.dll into VB
    by going to "components" and adding it in. But I get an error saying
    "riched20.dllwas not registerable as an ActiveX Component".


    do you have any idea on how I could import it into VB?


    cheers,
    Abdul

  2. #2
    Guest
    Register it by...

    go to Start > Run
    then type Regsvr32.exe riched20.dll

  3. #3

    Thread Starter
    Hyperactive Member Abdulrahman's Avatar
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    281

    many thanks...

    many thanks...

    but.. when I did that I get the following error

    "riched20.dll was loaded, but the DllRegisterServer entry point was not found"

    Does anyone have any idea on what I can do?

    has anyone used the riched20.dll in VB?

    any ideas Megatron?

    thanks!
    Abdul

  4. #4
    Junior Member
    Join Date
    Jul 2000
    Location
    Belfast
    Posts
    28
    A dll file is not an Active X control and therefore is not listed in the components. dll are registered in the references section.

    If the dll registration failed do a search for regsvr32.exe once you have located it go to a dos prompt window and execute the command from the directory where regsvr32.exe is located and give the full path of the dll.
    eg
    C:\windows\system>regsvr32.exe "C:\windows\system\riched20.dll"

    On the menu Bar in your VB project (the one using the dll) select Project then select References in the list you should see your new dll. tick the box and the whole thing should work.

    [Edited by charliecatney on 11-03-2000 at 05:17 AM]

  5. #5

    Thread Starter
    Hyperactive Member Abdulrahman's Avatar
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    281

    thanks

    thanks, I tried it..

    but then what do I do?

    how do I use the control? I have added the dll to the refferences now (in VB)... but how can I use the dll now?

    thanks a lot

    yours,
    Abdul

  6. #6
    Junior Member
    Join Date
    Jul 2000
    Location
    Belfast
    Posts
    28
    If everything is registered and referenced properly.

    I added the dll and the reference is called "tom"

    To make use of the dll
    Carry out the following
    Code:
    Dim x as new tom.'Selected Class'
    
    'use the properties methods and events for the dll as 
    x.'Property/Method/event'
    Charlie

  7. #7

    Thread Starter
    Hyperactive Member Abdulrahman's Avatar
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    281

    thanks charlie

    thanks,

    am still confused, as I have done what you said... and yes "tom" appears now in my refferences.

    But.. I dont know how to use this dll. I mean.. is it not to be used like a control you see in the tools on the left (in VB).. like command button, label, image, combobox etc etc ?


    thanks again !

    Abdul

  8. #8
    Guest
    You can check to see if it is a control.

    Richt click on your toolbox, select components. and search for it in you list. Perhaps it exist as a control..

  9. #9
    Guest
    The Text Object Model is a right pain in the butt ot use. Have a look at vbAccelerators RichEdit control (www.vbaccelerator.com)which uses a lot of the functions avaialble in the tom, although he is send API messages instead of going throug the tom.

    - gaffa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width