How to preview the part like openfile dialog box with same quality?

I want to preview the part like openfile dialog box befort open the part file.

I used the three methods but the image is not good at pixel or precision,

the image in openfile dialog box is better than that.Look the pictute.

I don't know how to get the image with the same precision .

My code is(in SW2007)

        Me.Image1.Picture = swCfg.GetPreviewBitmap(nRetVal)
        Me.Image2.Picture = swCfg.GetPreviewPNGBitmap(nRetVal)
        Me.Image3.Picture = swApp.GetPreviewBitmap(openFile, vCfgName)

SolidworksApi macros
Answers 3
SF
SF 2009-11-18 Best Answer
Your problem is fundemental (if thats spelt right :O). The image you are getting is much larger than your preview box and the control you are hosting it in is not anti-aliasing the image so when it scales down it scales by pixels with no smoothing. Try changing changing the scaling option of your control to not scale the image to see what I'm on about. Then from there depending on what language you are using you have several options to enable AA scaling of images without problem.
SZ
SZ 2009-11-20

Thanks,Luke.

I used the VBA in SW2007 marco.

And used the Image control tool,

But I cna't find the options to enable AA scaling of images .

How Can I do?

SF
SF 2009-11-20

You cannot do it directly in VBA, you will need to use ActiveX.

Here is a quick control I made to create a smoothed image from a full size one got from GetPreviewBitmapFile.

To run it first call regasm SmoothImageControl.dll /tlb to register the dll on your system and then in the macro re-reference the reference to it, and it shows you how its done.