views:

118

answers:

1

I was using spy++ and noticed that the IE control I have embedded in a windows form was periodically calling or sending WM_PAINT when it repaints itself. I'm trying to figure out how in C# code I can perform a C# method every time this control sends WM_PAINT. I know just enough pinvoke at this point to be dangerous.

Thanks in advance,

Bob

A: 

You don't really need PInvoke to do this. The proper way is to use subclassing to handle specific Windows messages. Here's a link to do this:

Handle Windows Messages with .Net

Tommy Hui
This is very useful info. Great answer!
Beaker