In This Topic

Using GdPicture.NET COM/ActiveX Edition

In This Topic

Summary

GdPicture.NET 12 includes a COM Edition that can be used like a COM/ActiveX component with IntelliSense support in environment supporting this technology such as Visual Basic 6, html pages, Delphi and Visual FoxPro.

This edition is automatically registered on your computer when installing the GdPicture.NET 12 package.

The dll is located in [INSTALLATION FOLDER]\Redist\COM Interop\ and can be registered on other computers by using the regasm command with admin privileges.

IE: %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm.exe GdPicture.NET.14.dll /codebase /tlb

Using GdPicture.NET 12 COM Edition in Visual Basic 6

See example [INSTALLATION FOLDER]\samples\AnyCPU\vb6 using com interop

Note:

  • IntelliSense is fully supported.

Using GdPicture.NET 12 COM Edition in Microsoft Access

See examples [INSTALLATION FOLDER]\samples\AnyCPU\msaccess using com interop

Note:

  • IntelliSense is fully supported.
  • Trick for resizing GdPicture controls (thanks to Greg N.):
    Use the menu at the top to insert an activeX control. Pick the GdPicture.NET usercontrol. It will be a default size.
    Then use the lower right corner and drag the size of the control to what you want. Save the form, close, then double click to open it.
    Be sure you also set the anchoring on the control so windows does not try to resize it based on the form size. The control reacts badly to this. Set it to top left.
    Nothing fancy but works!

Using GdPicture.NET 12 COM Edition in Delphi & C++ Builder

See example [INSTALLATION FOLDER]\samples\AnyCPU\delphi using com interop

Note:

  • IntelliSense is fully supported.
  • Floating point exceptions must be turned to Off in Delphi by using
    Set8087CW($133f);
    
    
  • Floating point exceptions must be turned to Off in C++ Builder by using:
    #include <WTypes.h>
    
    Set8087CW(0x133f);
    
    
  • To import the SDK in the ActiveX Palette: Components / Import Component... / Import ActiveX Control / Select GdPicture.NET / select Generate Component Wrappers / Install to a new Package / use GdPicture as package name / Finish.

 

Using GdPicture.NET 12 COM Edition in Visual FoxPro

See example [INSTALLATION FOLDER]\samples\AnyCPU\vfp using com interop

Note:

  • IntelliSense is fully supported.
  • We highly suggest to add the following line code in the init of your program: application.AutoYield = .F.

Using GdPicture.NET 12 COM Edition in HTML/JavaScript

See example [INSTALLATION FOLDER]\samples\AnyCPU\html using com interop

Using GdPicture.NET 12 COM Edition in SilverLight 4 and higher

See example [INSTALLATION FOLDER]\samples\AnyCPU\silverlight using com interop

Note:

  • Using GdPicture.NET COM Edition in SilverLight requires your application to run as an Out Of Browser (OOB) with elevated permissions. Also, there is no IntelliSense for GdPicture objects.

Using GdPicture.NET 12 COM Edition in Visual C++ with MFC

  • Start a new project
  • Select the "Add Class" item of the "Project" menu.
  • Select MFC Class From TypeLib.
  • Select "Add class from File" and click the "..." button to navigate to select GdPicture.NET.14.tlb file located in [INSTALLDIR]/Redist/COM Interop.
  • Select the interfaces you need from the list to generate the C++ wrappers*.

* Be careful, each GdPicture class will be spitted into two classes: One defining events and another one defining properties & methods. For example to import the GdPictureImaging class you should select "__GdPictureImaging" and "_GdPictureImaging".

External tutorials

Using GdPicture.NET in web page
Importing GdPicture.NET in RAD Studio
Getting started with C++ Builder XE
Other tutorials can be found on our dedicated COM forum