Does anyone know a method to insert a image in background into a ListBox in WinForms C#?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, you’ll have to inherit a new control from ListBox. To to that, create a new project in your solution, of the type ‘Windows Control Library’, and use the code below in the file control’s source code file:
I omitted all the designer code and such for brevity, but you’ll have to remember to
Disposeof the Image and the Brushes in theDisposemethod of the control.