[quoted text, click to view] "YYZ" <none@none.com> wrote in message
news:Odd90b%23YFHA.1868@TK2MSFTNGP14.phx.gbl...
> "Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
> news:ur%23lMwwYFHA.3616@TK2MSFTNGP15.phx.gbl...
>> Do you have to edit the text in the box or is it just a fat label?
>
> I wish. Yes, the text will have to be editable.
In trying to get this done, I have TRIED the following, but can't figure out
why it won't work. I created a new standard windows form project
(VB.net) -- I then added in a project for an inherited usercontrol. I then
immediately went into this usercontrol's code editor and changed its inherit
line to this:
Inherits System.Windows.Forms.TextBox
This is very nice, as when I add the usercontol onto my test form in the
other project, it acts just like a usercontrol.
Now, I want to override the onPaint or onPaintBackground funtionality (is
this an event, a method, ??) -- I have added this code:
Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
Debug.WriteLine("OnPaint")
MyBase.OnPaint(e)
End Sub
But I never get a debug statement printed. I also added this (just for
testing)
Protected Overrides Sub OnMouseEnter(ByVal e As System.EventArgs)
Debug.WriteLine("OnMouseEnter")
MyBase.OnMouseEnter(e)
End Sub
And I DO get debug statements. So, either I'm not understanding how the
onPaint thing works, or I'm just flat out trying to implement it
incorrectly, or both.
Any ideas from anyone out there?
Once I DO figure out how to get the paint stuff plugged in, then I'll worry
about drawing my image in teh correct place. After that I'll worry about
adding in a new event, etc. But first, I've got to figure out how to draw
what I want.
Thanks to anyone out there for any advice, pointers, articles, etc.
Matt