TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Giles Papworth
NA
33
0
Form re-paint GDI+
Oct 19 2009 6:36 AM
I have a form which i am painting a custom interface for (I.E Skinning it)
However i have one issue which is:
I am painting the title bar, minimize, maximize and close buttons manually. I paint these on using the graphics object and all looks fine and dandy. However i have one small issue. When someone hovers over say the close button i need to change the image that has been painted in that area. The only way i can see to do this is:
1. create a picture boxe in the location for the close button and change the image depending on the mouse state which could be clunky.
2. repaint the form and paint the correct image in its place. However repainting the entire form for just one button state is a bit heavy and could be very slow. Although it would give me what i want it would not give the user a good experience in the app.
Is there any way of re-painting just a specific area of the form or do i really have to go with a picturebox and change the image depending on the mouse state?
Cheers
Reply
Answers (
17
)
copy contents of CDC to gdi + graphics object
Control Repaint