Black Ice Software
October Developer News
Volume 12, Issue 10 - September, 2007
The BLACK ICE NEWSLETTER is published by Black Ice Software, LLC. The contents of this newsletter in its entirety are Copyright © 2007 by Black Ice Software, LLC. 292 Route 101, Salzburg Square, Amherst, NH 03031, USA. Black Ice Software, LLC. does hereby give permission to reproduce material contained in this newsletter, provided credit is given to the source, and a copy of the publication that the material appears in is sent to Black Ice Software at the above address. Phone: (603) 673-1019 Fax: (603) 672-4112 sales@blackice.com www.blackice.com

HOW CAN I SET THE GENERATE IMAGE IN MEMORY FEATURE PROGRAMMATICALLY IN A VB.NET PROJECT?

You can use the EnableGenerateImageInMemory method of the BlackIceDevmode.ocx. The method has only one parameter: a handle to the devmode structure. You can get the handle to the devmode structure by loading the devmode using the LoadBlackIceDevmode method.

Not all file formats support the Generate Image in Memory feature. Only TIF, BMP and EMF files can be generated in memory. So if another file type is set (for example JPG) in the printing preferences, you won’t be able to enable the Generate Image in Memory feature. When you call the SaveBlackIceDEVMODE method, the method doesn’t save any invalid settings (in this case the Generate Image in Memory is invalid, because the JPG doesn’t support it). But you can programmatically change the file format with the SetFileFormat method.