Hi NG,
i encountered a problem during developing some activex control with c#.
I read an article that it is possible to expose windows forms as
activex controls. So I tried it and it worked really great!
Here is the link to the article:
http://www.codeproject.com/cs/miscct...etcontrols.asp
Testing the newly created control with the Testcontainer for ActiveX
Controls showed no problems.
Now I inserted my activex control into Authorware 7.0 everything is
fine the control works, but if I click at the "pause"-Button I get an
exception:
System.ArgumentException: hdc
at
System.Windows.Forms.DibGraphicsBufferManager.Crea teCompatibleDIB(IntPtr
hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
at System.Windows.Forms.DibGraphicsBufferManager.Crea teBuffer(IntPtr
src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
at
System.Windows.Forms.DibGraphicsBufferManager.Allo cBuffer(Graphics
targetGraphics, IntPtr targetDC, Rectangle targetBounds)
at System.Windows.Forms.DibGraphicsBufferManager.Allo cBuffer(IntPtr
target, Rectangle targetBounds)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
Unfortunately I dont understand this exception. I dont now what the
"hdc" argument is and why this exception occurs.
Maybe anyone can help or give some suggestions?
Thanks in advance.
kind regards
Andreas Heinecke