LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

print panel to file

i just want to print a panel, or actually a graph box within a panel, to an image file.   as a .jpg, .gif,.bmp, or whatever

 PrintPanel() doesnt work for me, it only prints a printer file.

any suggestions?  thanks

0 Kudos
Message 1 of 6
(4,291 Views)
Hi.

You can capture the current appearance of a control using GetCtrlDisplayBitmap(), then save it to a file using either SaveBitmapToJPEGFile() or
SaveBitmapToBMPFile(). Remember to call DiscardBitmap() when you are done.

All of these functions are in the User Interface library.

Regards,
Colin.
Message 2 of 6
(4,281 Views)
hey, thanks a lot.  that was exactly what i was looking for.


0 Kudos
Message 3 of 6
(4,194 Views)
Hi,
How can I realize this when using CVI IDE 5.0, since there is not method "SaveBitmapToBMPFile" or "SaveBitmapToJPEGFile", as in the higher version?
Thanks very much!
 
    LI Xiaogai
0 Kudos
Message 4 of 6
(4,118 Views)
Hi LXGPanda,

Please try the solution offered by Roberto in Saving panel to file (jpeg format).

Cheers,

David Goldberg
National Instruments
Software R&D
0 Kudos
Message 5 of 6
(4,100 Views)

Hi AEDavid,

Thanks very much! I have tried as you suggested me, it indeed work!

Thanks again!

Best regards!

 LI Xiaogai

0 Kudos
Message 6 of 6
(4,088 Views)