Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2004

Tip: Looking for answers? Try searching our database.

Textbox and setting the BackgroundImage property

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil Jones - 03 Oct 2004 07:34 GMT
After discovering that the OnPaint method of the TextBox doesn't work - I'm
doing a work around using the TextBoxe's BackgroundImage property.

But that doesn't have any effect either.  Does anyone know if I should
expect to be able to set a BackgroundImage on the textbox - is that a known
bug as well?

Thanks everyone.

Signature

===
Phil
(Auckland | Aotearoa)

Ken Tucker [MVP] - 03 Oct 2004 12:22 GMT
Hi,

http://www.codeproject.com/cs/miscctrl/alphablendtextbox.asp

Ken
-----------------
After discovering that the OnPaint method of the TextBox doesn't work - I'm
doing a work around using the TextBoxe's BackgroundImage property.

But that doesn't have any effect either.  Does anyone know if I should
expect to be able to set a BackgroundImage on the textbox - is that a known
bug as well?

Thanks everyone.

Signature

===
Phil
(Auckland | Aotearoa)

"Jeffrey Tan[MSFT]" - 04 Oct 2004 09:53 GMT
Hi Phil,

Based on my understanding, you want to set a background image to the
textbox.

.Net Textbox did have a build-in support for it. So we have to inherit and
create a customize one ourselves. To enable the custom paintint, we should
use SetStyle() method to set ControlStyles.UserPaint bit to true.

We may use Graphics.DrawImage method to draw the background image. But it
may have many problem about the text painting with the background image,
the article provided by "Ken Tucker [MVP]" did a good trick about achieve
this. I suggest you refer to that article and download the source code to
have a view.

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.