Loading...

Image List loading in Microsoft Access

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Image List loading in Microsoft Access

Postby GMan » Sat Dec 05, 2009 8:48 am

Hello,

I am using Microsoft Access 2007 and trying to convert the thumbnail.net example to work in VBA. I have it 99% complete but getting stuck on how to load the created thumbnail into the image list. The line I am specifically working on is: Call ImageList1.Images.Add("", Bitmap.FromHbitmap(AxImaging1.GetHBitmap)). I do not know how to get the bitmap from the aximaging1 control. Apperantly the bitmap class is not native in VBA like it is for .net.

Thanks for any help you can provide
Greg
GMan
 
Posts: 8
Joined: Wed Dec 17, 2008 6:13 pm

Re: Image List loading in Microsoft Access

Postby Loïc » Sat Dec 05, 2009 6:44 pm

Hi Greg,

Please, attach your converted example, I will try to add the missing parts.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Image List loading in Microsoft Access

Postby GMan » Thu Jan 28, 2010 7:30 am

Loic,

sorry for the post delay. Here is the code so far. I have a list view control on my form called Ill_List. I am tryiong to load a single file for now but will eventually have a list to add 1-5 most likely.
Private Sub load_thumbs()
Dim nImageID As Long
Dim nThumbnailID As Long
Dim nCpt As Integer
Dim objitem As Object

nImageID = Imaging0.CreateImageFromFile("C:\Program Files\MedWorxs\Diagrams\1.jpg")
ImageList1.ImageHeight = 100
ImageList1.ImageWidth = 100
ImageList1.ListImages.Clear
Me!Ill_List.ListItems.Clear

GdViewer1.ZoomMode = GdPicturePro5.ViewerZoomMode.ZoomFitToControl

nThumbnailID = Imaging0.CreateThumbnailHQEx(nImageID, 100, 100, GdPicturePro5.Colors.LightGray)
Imaging0.SetNativeImage (nThumbnailID)
Call ImageList1.ListImages.Add(1, , Imaging0.GetHBitmap)
Set objitem = Me!Ill_List.ListItems.Add(, , " ", 1)

Imaging0.CloseImage (nThumbnailID)

GdViewer1.SetNativeImage (nImageID)
Me!Ill_List.Icons = Me!ImageList1.Object

End Sub


Thanks for your help!
Greg
GMan
 
Posts: 8
Joined: Wed Dec 17, 2008 6:13 pm


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest

cron