Control as bitmap

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin H.

    #1

    Control as bitmap

    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
  • ClayB

    #2
    Re: Control as bitmap

    Here is one way you can create a bitmap of a form. I think the code
    can be tweaked to handle a Control.

    Get detailed answers to common queries about Syncfusion Windows Forms components covering installation, features, licensing, and developer support.


    =============== =====
    Clay Burch
    Syncfusion, Inc.



    Comment

    • =?ISO-8859-1?Q?G=F6ran_Andersson?=

      #3
      Re: Control as bitmap

      Martin H. wrote:
      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.

      --
      Göran Andersson
      _____
      Göran Anderssons privata hemsida.

      Comment

      • Martin H.

        #4
        Re: Control as bitmap

        Hello Göran,
        Use the DrawToBitmap method.
        Thanks a lot, that's what I was looking for.

        Best regards,

        Martin

        Comment

        • Herfried K. Wagner [MVP]

          #5
          Re: Control as bitmap

          "Martin H." <hkshk@gmx.nets chrieb:
          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.VisualSt yles.VisualStyl eRenderer' (.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.

          --
          M S Herfried K. Wagner
          M V P <URL:http://dotnet.mvps.org/>
          V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

          Comment

          Working...