c# - Overlay transparent image over Adobe PDF Reader control -


i'm trying overlay transparent image on adobe reader control. can read pdf while image overlapped.

currently have reader control , imagebox, got overlay button when click supposed make image transparent can read text "through" it, @ least it's transparent in image.

public partial class form1 : form {     public form1()     {         initializecomponent();     }       private void opentoolstripmenuitem_click(object sender, eventargs e)     {         openfiledialog open = new openfiledialog();         open.title = "open";         open.filter = "pdf|*.pdf";          try         {             if (open.showdialog() == system.windows.forms.dialogresult.ok)             {                 axacropdf1.loadfile(open.filename);             }         }         catch (argumentexception ex)         {             messagebox.show(ex.message.tostring(), "error", messageboxbuttons.ok, messageboxicon.error);         }         catch (exception ex)         {             messagebox.show(ex.message.tostring(), "error", messageboxbuttons.ok, messageboxicon.error);         }     }      private void exittoolstripmenuitem_click(object sender, eventargs e)     {         application.exit();     }      private void overlaytoolstripmenuitem_click(object sender, eventargs e)     {         picturebox1.backcolor = color.transparent;          picturebox1.parent = axacropdf1;        } } 

my designer far:

my designer far.

i can see issue here, trying set colour of picture box object transparent, not affect image in way.

imagine had no image loaded picture box, changing colour here make difference.

to achieve desired effect, need photo edit picture , make version has transparency (lowering alpha , saving .png). once click button need swap original image newly created transparent image. can use line picturebox1.image = image.fromfile("path") in case.


Comments