AccusoftImagXpress13 ActiveX DLL > ImagXpress Object : AssignDIB Method |
Visual Basic |
---|
Public Function AssignDIB() As Long |
The handle to the assigned DIB. If the method fails, the return value is zero.
This method is typically used to assign the DIB from an ImagXpress control to either a variable or another ImagXpress control. In the following example, ImagXpress2 receives the DIB and ImagXpress1 no longer has a DIB.
In the following example, ImagXpress2 receives the DIB and ImagXpress1 no longer has a DIB.
ImagXpress2.hDIB = ImagXpress1.AssignDIB
Note that the receiver is responsible for freeing the DIB by issuing a GlobalFree on the DIB Handle. If the receiver is an ImagXpress control, there is no need to issue the GlobalFree as ImagXpress does this for you.
VC++ Example
MyDIB = ImagXpress1.AssignDIB;
// Do something with MyDIB
// Now free the DIB
GlobalFree(MyDIB);.