Now, here is the initialization code to put a nice image in the control (which is a PictureBox control now), and set the transparency color of the control to the background color of, in this case, the tab page it is on:
private void initDropControl() { Image resImg; System.Drawing.Image img; System.Drawing.Color backGroundColor; int colorR; int colorG; int colorB; System.Windows.Forms.PictureBox dropControl; // Get handle to the control dropControl = ManagedHostDropFile.control(); // Setup event handlers for the control dropControl.add_DragDrop(new ManagedEventHandler(this, 'dropFile_DragDrop')); dropControl.add_DragEnter(new ManagedEventHandler(this, 'dropFile_DragEnter')); dropControl.set_AllowDrop(true); // Load the AX resource image resImg = new Image(); resImg.loadResource(12452); // Get the tab page background color backGroundColor = System.Drawing.ColorTranslator::FromOle(TabPageLoadFile.backgroundColor()); colorR = backGroundColor.get_R(); colorG = backGroundColor.get_G(); colorB = backGroundColor.get_B(); // Set the transparancy color of the AX resource image to the tab page background color resImg.transparent(true, colorR, colorG, colorB); // Create an image object that the Windows Form control is able to load img = System.Drawing.Image::FromHbitmap(new System.IntPtr(resImg.exportBitmap())); // Add the image to the control dropControl.set_Image(img); }