Loading...

DisplayFromMetaFile

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

DisplayFromMetaFile

Postby MarcoLo » Wed May 21, 2008 3:51 pm

The gdViewer shows Metafiles in a very good quality.

Unfortunately I have however a problem with the function DisplayFromMetaFile() from gdViewer. If I load alternating different Metafiles with DisplayFromMetaFile(), after approximately 30 repetitions, the GdPictureStatus "1 GenericError" or "2 InvalidParameter" is returned.

In the attachment is a sample VB6 program.

Excuse for my bad English.

Thank you for your support

Code: Select all
Private Sub Command1_Click()
    Static tNum As Integer
    Dim tGdPictureStatus As Long
   
    If tNum = 0 Then
        tNum = 1
        tGdPictureStatus = GdViewer1.DisplayFromMetaFile(App.Path & "\542654140D.wmf")
    Else
        tNum = 0
        tGdPictureStatus = GdViewer1.DisplayFromMetaFile(App.Path & "\542723140D.wmf")
    End If
    If tGdPictureStatus > 0 Then
        MsgBox "error: " & tGdPictureStatus
    End If
End Sub
Attachments
Sample.zip
(38.21 KiB) Downloaded 83 times
MarcoLo
 
Posts: 4
Joined: Mon Apr 28, 2008 2:03 pm

Re: DisplayFromMetaFile

Postby Loïc » Thu May 22, 2008 10:19 am

Hi,

It is normal. You never close the displayed image before openning another one.

You have just to add a call to the CloseImage() method before loading image.


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

Re: DisplayFromMetaFile

Postby MarcoLo » Thu May 22, 2008 2:52 pm

This was the problem.

Thank you very much
MarcoLo
 
Posts: 4
Joined: Mon Apr 28, 2008 2:03 pm


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: Bing [Bot] and 1 guest