Click here to Skip to main content
15,886,798 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello guys
i need your help
i'm working on a puzzle project on winform
i wrote the methods and everything .. but i need to put the final touches
and that is the winning part
pictures are on buttons (look cooler)
what i'm looking for is a way to attach the matching pictures (i wrote a method to see if a picture is in the right position)
so is there a way to attach 2 buttons or more?
thanks in advance :)
Posted
Updated 30-Dec-11 22:08pm
v3
Comments
[no name] 30-Dec-11 23:23pm    
Attach two buttons where?
Sergey Alexandrovich Kryukov 31-Dec-11 2:32am    
Forms? WPF? What? -- tag it!
--SA
RaviRanjanKr 31-Dec-11 11:10am    
Not Clear. Please be more specific while questioning. :)

1 solution

There is no sense in putting pictures on buttons for such project. If this is System.Windows.Forms, you can use System.Windows.Forms.PictureBox. If the pictures are not rectangular, it's more difficult. To make are really non-rectangular control, you need to assign a non-rectangular region to the property System.Windows.Forms.PictureBox.Control.Region, for control of any type.

See:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.picturebox.aspx[^].

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900