Welcome to Sign in | Help

Re: Background image to a button Visual C#

  •  05-23-2008, 10:26 AM

    Re: Background image to a button Visual C#

    Asta chiar că mi se pare o întrebare pentru RONUA, nu pentru ROSQL.
    Dar hai, fie... Ai creat un UserControl sau un Custom Control ?

    Dacă ai creat un UserControl, e banal: pui BackgroundImage şi gata.

    Dacă ai creat un Custom Control atunci cred că trebuie să faci ceva de genul:

            protected override void OnPaint(PaintEventArgs pe)
            {
                Graphics g = pe.Graphics;
                g.DrawImage(global::MyApplication.Properties.Resources.MyPicture,new Point(0,0));
                base.OnPaint(pe);
            }

    Răzvan
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems