Control as bitmap

  • Thread starter Thread starter Martin H.
  • Start date Start date
M

Martin H.

Hello all,

I want to get a control (in my case a CheckBox with the states
Checked=True and Checked=False) as bitmap. It is important for me that
it shows in the desktop theme if the user is using one.

Any ideas?

Thanks in advance.

Best regards,

Martin
 
Martin said:
I want to get a control (in my case a CheckBox with the states
Checked=True and Checked=False) as bitmap. It is important for me that
it shows in the desktop theme if the user is using one.

Any ideas?

Use the DrawToBitmap method.
 
Martin H. said:
I want to get a control (in my case a CheckBox with the states
Checked=True and Checked=False) as bitmap. It is important for me that it
shows in the desktop theme if the user is using one.

As I replied in the German VB group, you can use
'System.Windows.Forms.VisualStyles.VisualStyleRenderer' (.NET 2.0) to draw
themed control parts. You may want to take a look at the implementation of
the 'System.Windows.Forms.CheckBox' class using Lutz Roeder's Reflector in
order to see how this class is used.
 
Back
Top