Draw in form titlebar from external code? [.NET 2.0]

  • Thread starter Thread starter Steve Marshall
  • Start date Start date
S

Steve Marshall

I want to be able to insert some text into the active form's title
bar, from code that is external to the form. It's essentially a timer
showing time elapsed since something happened in the application. I
have seen posts about using the WM_NCPAINT message, but that requires
code in the forms themselves. Ideally I don't want to have to add any
code or anything else to the target form(s) - I want this to be
completely driven from the external code. The forms themselves don't
even need to know it is happening.

Can this be done? It seems to me I should be able to get hold of a
Graphics object, device context, or something for the form's outer
window, then just draw the text into it at the appropriate place. But
from searches to date I can't see a way to do it. Any suggestions
welcome.
 
Back
Top