Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Petr Danes is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    18

    ogl.dll for Lebans' graphics

    I'm using Stephen Lebans' picture box class, in a database designed in Access 2007. One of my users recently migrated to 2013, and the control no longer works. It crashes while looking for ogl.dll in the Microsoft Shared folder. Neither this folder, nor the dll are present in the new machine. Does anyone have any experience with using this class on newer versions of Access?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    What does this dll do? Did you try copying the folder and file to the new machine?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Petr Danes is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    18
    I don't know exactly what it does. Stephen probably does, but he's retired. I just encountered the problem today, and didn't have an opportunity to copy anything from another machine. I can try that, but I would rather update the VBA code to look for another (proper) .dll, if there is another, new one that will do the job. Otherwise, I would have to copy this old .dll to every new machine that uses these apps.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    Have to know what the dll is for before can suggest an alternative. I did a quick Bing search but can't find anything.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Petr Danes is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    18
    Naturally, I looked around before posting here. Stephen has been out of the business for years now, or I'd ask him directly. He was very good about responding to people using his software.

    Ogl stands for Office Graphics Library, and it does something that allows Access VBA to perform graphics functions. However, I have not analyzed the code in enough detail to determine exactly what its functions are. I expect that there is some new version of the .dll, named something else and located somewhere else, in the new version of Access. I'm hoping someone here has already faced and solved this.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    I am not seeing that library or anything like it listed in VBA references.

    Got a lot of hits with another search of Bing: Office graphics library lebans

    This seemed most relevant http://www.lebans.com/imageclass.htm
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Petr Danes is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    18
    Neither did I, which is why I started this thread. Googled lots of variations, but found nothing useful.

    I know about Lebans' site - that's where I got the code to begin with. But if you look at the site's homepage, you'll see that he has been 'out of business' for almost five years, and quit supporting it long before the current version of Access was available. There were a fair number of people that used his software, and I'm hoping that someone from that crowd has already discovered what is necessary to make it work in the newer versions.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    I downloaded the sample db from that link and it works. The only additional library referenced was:

    Microsoft Visual Basic for Applications Extensibility 5.3

    What is it you want to do with this picture box? If you just want to display images, use Image control. The ControlSource property was added with Access 2007.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Petr Danes is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    18
    All of it works? The manual drawing, displaying shapes, colors? What I'm doing is displaying an image, then drawing some shapes on top of the image, based on what is selected from an ordinary Access recordset. It's a mapping application, with a map of the Czech Republic as background image, and places where various animals were recorded marked on the map by drawing shapes to indicate what was found where. Nothing overly complex, but more than Access (2007) could do at the time I developed the app. Maybe the newer versions have enough enhanced graphics capabilities that I can do without Lebans' class - I haven't studied everything the newest versions can do, but I wasn't aware that graphics handling had been upgraded in any significant manner.

    I'll take a look at work tomorrow - my home machine doesn't have Access on it.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    Everything except the ScaleUp and ScaleDown seem to work. Missing file msvbvm50.dll.

    Access graphics capability is not enhanced beyond Access 2007.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    Petr Danes is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    18
    Okay, I'm at work. Partly erroneous reporting of the problem, as it turns out. It wasn't Lebans' code, but some similar code that gets called just before it - loads a symbol from a memo field into an array, and Leban's code than displays that symbol. The function is trying to load ogl.dll, like this

    hMod = LoadLibrary(Environ$("CommonProgramFiles") & "\Microsoft Shared\Office12\ogl.dll")

    I found a routine on the net that loads GDIPlus.dll instead,

    hMod = LoadLibrary("gdiplus.dll")

    but the result is the same - works on my 2007 machine, but crashes on a 2013 installation, and for the same reason - can't find this file, either. There are 24 instances of GDIPlus.dlll on the 2013 machine, all different, all in various subfolders of C:\Windows\Winsxs, but not one anywhere in the Office path. No instances of ogl.dll, the original file, anywhere.

    I would guess that there is a new .dll for whatever ogl.dll did in my development machine, but I can't figure out what it might be, or where to even look for such information.

  12. #12
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    This symbol is just text?

    I wonder what either dll has to do with handling a text value.

    Does copying the GDIPlus.dll into Office folder help?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    Petr Danes is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    18
    No, they are large disk, small disk, triangle, asterisk, lightning bolt and similar icons. They are actually icons for controls on the ribbon - the map drawing part works fine. The ribbon callback routine getImage calls a routine that retrieves the binary image from the OLE Object field of a table containing these icons.

    I don't know which one I should try to copy - they're all different, or at least all different sizes and subfolders. I guess I could just try a few and see what happens, but even if it works, I'd still be stuck with such a manual intervention on any machine using this app, which is not an ideal solution.

    Still, it's a place to start. I'll give it a shot and see what happens.

  14. #14
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    So the symbols are in OLEObject field, not memo type?

    I think Lebans wrote this procedure before the Image control was enhanced with a ControlSource property and maybe even before the Attachment field type. I've never had good experience with OLEObject field and controls. I use Attachment field and Image control. No code is required to load image to an Image control although code can be used.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    Petr Danes is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    18
    SOL, the 2013 machine is in a domain, and the Program Files folders are off limits to non-admin users.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Working with Graphics
    By WiReLaD in forum Database Design
    Replies: 12
    Last Post: 04-19-2013, 07:01 AM
  2. Lebans Continuous Forms Control Tip - In Subform
    By Whizbang in forum Programming
    Replies: 4
    Last Post: 01-16-2013, 08:17 AM
  3. Auto-size Text in Report or Form - Possibly Lebans
    By shane201980 in forum Programming
    Replies: 5
    Last Post: 10-29-2012, 12:24 PM
  4. Replies: 10
    Last Post: 01-04-2012, 01:43 PM
  5. Message Graphics
    By pkstormy in forum Access
    Replies: 0
    Last Post: 01-01-2011, 10:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums