c# - Transparent pixels aren't transparent -


let me start off saying tried research this, i'm unable word wouldn't irrelevant results.

so here's issue. have button (actually, 6 buttons) have rounded corner appearance. they're saved pngs, , loaded button using button.backgroundimage = [resource]. 5 of them work fine. when they're clicked, background image changed and, again, looks fine - including changing when button no longer pressed. there's button in screenshot below.

i have no clue green color coming - in fact, when go pixel-by-pixel on image using getpixel, , check argb values, turn out purples = 0. confusing green shows @ run-time -- shown in image. according photoshop , gimp, rgb 46,139,86 .. getpixel shows them various colors in purple range, example, @ 0,0 shows 164,119,182 a:0.

here's list of things i've tried (some pseudocode):

  • if (pixel.a == 0) { setpixel(x,y,color.transparent); } -- no change
  • if (pixel.a == 0) { setpixel(x,y,form1.transparencykey); } -- see through desktop instead of form background (as expected).
  • use known image (see screenshot) -- no change.
  • delete control, copy , paste known control (see screenshot) -- no change.
  • add control, hoping hide flawed 1 , ignore it. -- new buttons have issue.
  • move button different area of form (long story). -- no change.
  • set no background in designer, set background in form1.load. -- no change.
  • restart visual studio. -- no change.
  • clean solution, rebuild. -- no change.
  • restart computer. -- no change.

anyone have issue before, or know what's going on? have solution works (use panel button - tested , transparency fine on new panel) .. i'd prefer figure out. in advance!

here's imgur:

enter image description here


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -