|
-
March 5th, 2010, 11:30 PM
#1
Notification about paint event
I have a requirement where in I need to draw status images in the client area of a control [derived from AxHost].
There is no means to know when this control gets painted because the OnPaint event of AxHost is not exposed/ supported.
If I use a timer and keep painting the status images over the control, flicker occurs. Hence I want to avoid this method.
Is there a way to hook this control and get notified whenever the control is painted ?
-
March 6th, 2010, 11:22 AM
#2
Re: Notification about paint event
You should be able to override the OnPaint(PaintEventArgs) method.
MSDN on Aximp.exe:
"The ActiveX Control Importer generates a class that is derived from the AxHost class, and compiles it into a library file (DLL) that can be added as a reference to your application. Alternatively, you can use the /source switch with the ActiveX Control Importer and a C# file is generated for your AxHost derived class. You can then make changes to the code and recompile it into a library file."
So, you can use the /source switch to get the source code you can alter;
or you can derive from that class (if it's not sealed), and then override.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|