I'm fairly new to Windows Forms/.NET...
I'm wondering how I might go about rendering some custom painting on top of an ActiveX control. I've tried hosting the control within a panel, and then overriding the panel's OnPaint handler to do some GDI stuff, but no dice so far. I suspect AX controls are a bit of a different animal (as opposed to simply drawing over another Forms control within a panel), so I'm not sure what my options might be -- other than moving the custom drawing code back into unmanaged code within the control itself. Most of the data that I'm relying on would be up in the managed code level, so I'd really prefer that the custom drawing code also live up there if possible.
Is there a way to do this or am I out of luck Thanks in advance for any suggestion(s)/advice.

Painting on top of a hosted ActiveX control?
chuckles
Yes. As an example, the following test code didn't produce the results I was looking for:
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e)
// a simplification of custom painting...
Graphics gfx = e.Graphics;
Font font = new Font("Arial", 18, FontStyle.Bold);
Brush brush = new SolidBrush(Color.Red);
gfx.DrawString("Hello World", font, brush, 50, 50);
}
This did work ok when I put it in a "transparent" panel relative to the main form, but not when I had an AX control in the panel (not transparent). Wondering if the AX control underneath gets additional paint messages that cause it to redraw itself that wipe out what I do after I've rendered on top of it
TheSteve