a) How do I get the text/label to be below the thumbnail instead of to its right?
b) Also when I change the orders of the images using drag and drop. Is it possible to get a string of all the keys in the order that they are found in the list? Objective is to be able to save the file with the pages in the modified order.
i.e
3 images; move image3 to position2 : string I want to get its 1,3,2 as oppsed to the original 1,2,3.
c) Instead of using the Viewer to load and loop throught hte images producing the thumbnails. is there not a faster method? maybe just using the GDimaging? Or soemthing else maybe?
Code I have used to load images is as follows.
Code: Select all
Option Compare Database
Option Explicit
Public imgLstObj As MSComctlLib.ImageList
Public Function FctloadImgLst(VIEWER As Object, OGdImaging As Object, OImageList As Object, OListView As Object, VForm As Form, ByVal SFileName As String)
Dim nThumbnailID As Long
Dim nCpt As Integer
' Dim OListView As ListView
On Error GoTo Form_Current_Error:
10 VIEWER.SetLicenseNumber ("**")
20 OGdImaging.SetLicenseNumber ("**")
30 VIEWER.ZoomMode = GdPicturePro5.ViewerZoomMode.ZoomFitToControl
40 VIEWER.LockControl = True
50 VIEWER.PdfDpiRendering = 5
60 VIEWER.DisplayFromPdfFile (SFileName)
70 OListView.SmallIcons = Nothing
80 OImageList.ListImages.Clear
90 OListView.ListItems.Clear
100 OImageList.ImageHeight = (70)
110 OImageList.ImageWidth = (70)
120 If VIEWER.GetNativeImage <> 0 Then
130 For nCpt = 1 To IIf(VIEWER.PageCount > 20, 20, VIEWER.PageCount)
140 VIEWER.DisplayFrame (nCpt)
150 nThumbnailID = OGdImaging.CreateThumbnailHQ(VIEWER.GetNativeImage, 70, 70)
160 OGdImaging.SetNativeImage (nThumbnailID)
170 OImageList.ListImages.Add , "image" & Trim(nCpt), OGdImaging.GetPicture
180 Set OListView.SmallIcons = OImageList.Object
190 OListView.View = lvwSmallIcon
200 OListView.ListItems.Add , "image" & Trim(nCpt), "page " & Trim(nCpt), , "image" & Trim(nCpt)
210 OGdImaging.CloseImage (nThumbnailID)
220 Next nCpt
230 End If
240
250 OGdImaging.CloseImage (nThumbnailID)
Form_Current_Exit:
260 Exit Function
Form_Current_Error:
270 MSgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Fct_FctLoadImgLst of VBA Document Mod_" & "Error from Line No: " & Erl
280 Debug.Print "Error No: " & Err.Number
290 Debug.Print "Error Description: " & Err.Description
300 Debug.Print "Error from Line No: " & Erl
310 Resume Form_Current_Exit
End Function