<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Transparent Cursor Badge in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7916352#M26455</link>
    <description>&lt;P&gt;Save the file as a Windows .BMP file with the background color set to RGB 255,0,255.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then add that bitmap file to your project's resources as a System.Drawing.Bitmap resource. When your class that uses the resource is initialized, load the bitmap resource and pass it to&amp;nbsp;&lt;SPAN&gt;ConvertBitmapToAcGiImageBGRA32(), and assign the result to an&amp;nbsp;ImageBGRA32, and use that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the image is still mirrored, then just mirror the original source bitmap image before you save it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/672452"&gt;@Amremad&lt;/a&gt;wrote:&lt;BR /&gt;&lt;P&gt;sorry it's doesn't work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 08 Apr 2018 18:39:20 GMT</pubDate>
    <dc:creator>ActivistInvestor</dc:creator>
    <dc:date>2018-04-08T18:39:20Z</dc:date>
    <item>
      <title>Transparent Cursor Badge</title>
      <link>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7899778#M26452</link>
      <description>&lt;P&gt;Hi all&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i created a new&amp;nbsp;Cursor Badge using with file named icons8-broom-40.png but when i load my function it appears like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.jpg" style="width: 270px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/482970iD62B0DB92D362900/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.jpg" alt="Untitled.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;its mirrored and have a black background color which the png file is transparent&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so where is the problem cause i can solve it&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code that iam using it&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public static PromptSelectionResult SelectionSet(string blockName,string message, KeywordCollection keys,bool icon = false)
        {
            // start select blocks which we want to edit it
            // create selection filter with typedvalues
            TypedValue[] TypedValues = new TypedValue[1];
            TypedValues.SetValue(new TypedValue((int)DxfCode.BlockName, blockName), 0);

            SelectionFilter AcSelFtr = new SelectionFilter(TypedValues);

            // create keywords options for selection
            PromptSelectionOptions AcSelOption = new PromptSelectionOptions();
            if (keys != null) foreach (Keyword key in keys) AcSelOption.Keywords.Add(key.GlobalName);

            string kws = AcSelOption.Keywords.GetDisplayString(true);

            FStarting:
            AcSelOption.MessageForAdding = (message + kws);
            string input = null;
            AcSelOption.KeywordInput +=
              delegate (object sender, SelectionTextInputEventArgs e)
              {
                  OnKeywordSelected(keys, e.Input);
                  input = e.Input;
              };
            if (input != null) goto FStarting;

            ImageBGRA32 _img = null;
            var cbu = new CursorBadgeUtilities();
            if (icon == true)
            {
                // use this lines with autocad 2015 or higher              
                var bmp = new Bitmap(AMRObjectARX.Properties.Resources.icons8_broom_40);
                _img = Utils.ConvertBitmapToAcGiImageBGRA32(bmp);              
                cbu.AddSupplementalCursorImage(_img,10);
            }

            //start selectionset with keywords and filter
            PromptSelectionResult AcSelResult =  Application.DocumentManager.MdiActiveDocument.Editor.GetSelection(AcSelOption, AcSelFtr);

            //// use this lines with autocad 2015 or higher
            if (cbu.HasSupplementalCursorImage() &amp;amp;&amp;amp; _img != null) cbu.RemoveSupplementalCursorImage(_img);

            return AcSelResult;
        }&lt;/PRE&gt;&lt;P&gt;i hope to fix it&lt;/P&gt;</description>
      <pubDate>Sun, 01 Apr 2018 17:50:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7899778#M26452</guid>
      <dc:creator>Amremad</dc:creator>
      <dc:date>2018-04-01T17:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Transparent Cursor Badge</title>
      <link>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7899950#M26453</link>
      <description>&lt;P&gt;Have you tried using Utils.&lt;SPAN&gt;ConvertBitmapToAcGiImageBGRA32Ex() ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/672452"&gt;@Amremad&lt;/a&gt;wrote:&lt;BR /&gt;&lt;P&gt;Hi all&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i created a new&amp;nbsp;Cursor Badge using with file named icons8-broom-40.png but when i load my function it appears like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i hope to fix it&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Apr 2018 21:25:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7899950#M26453</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-04-01T21:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Transparent Cursor Badge</title>
      <link>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7915947#M26454</link>
      <description>&lt;P&gt;sorry it's doesn't work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 08:55:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7915947#M26454</guid>
      <dc:creator>Amremad</dc:creator>
      <dc:date>2018-04-08T08:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Transparent Cursor Badge</title>
      <link>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7916352#M26455</link>
      <description>&lt;P&gt;Save the file as a Windows .BMP file with the background color set to RGB 255,0,255.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then add that bitmap file to your project's resources as a System.Drawing.Bitmap resource. When your class that uses the resource is initialized, load the bitmap resource and pass it to&amp;nbsp;&lt;SPAN&gt;ConvertBitmapToAcGiImageBGRA32(), and assign the result to an&amp;nbsp;ImageBGRA32, and use that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the image is still mirrored, then just mirror the original source bitmap image before you save it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/672452"&gt;@Amremad&lt;/a&gt;wrote:&lt;BR /&gt;&lt;P&gt;sorry it's doesn't work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Apr 2018 18:39:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7916352#M26455</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-04-08T18:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Transparent Cursor Badge</title>
      <link>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7916840#M26456</link>
      <description>&lt;P&gt;yes it's work now&lt;/P&gt;&lt;P&gt;, the background color must be magenta&amp;nbsp; but why?&lt;/P&gt;&lt;P&gt;still appear littler border around courser image why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 03:49:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7916840#M26456</guid>
      <dc:creator>Amremad</dc:creator>
      <dc:date>2018-04-09T03:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Transparent Cursor Badge</title>
      <link>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7916861#M26457</link>
      <description>&lt;P&gt;In order to support bitmap images, a color must be dedicated to indicating transparent pixels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suppose magenta is the least-likely basic color that would be used as the display background color.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/672452"&gt;@Amremad&lt;/a&gt;wrote:&lt;BR /&gt;&lt;P&gt;yes it's work now&lt;/P&gt;&lt;P&gt;, the background color must be magenta&amp;nbsp; but why?&lt;/P&gt;&lt;P&gt;still appear littler border around courser image why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 04:24:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7916861#M26457</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-04-09T04:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Transparent Cursor Badge</title>
      <link>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7917294#M26458</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/672452"&gt;@Amremad&lt;/a&gt;wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still appear littler border around courser image why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Not sure why that is, but I've used it with a 16x16 bitmap with 32-bit color depth, and there's no border.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 08:59:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/transparent-cursor-badge/m-p/7917294#M26458</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-04-09T08:59:41Z</dc:date>
    </item>
  </channel>
</rss>

