[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

patrick

11/29/2004 1:55:00 AM

Hi Ng,

i have a background image on a panel. Now I want the image to be scaled to
the panel size. Is this possible? Can I also make the image transparent?

Thanks in advance and best regards,
Patrick Braunschweig
4 Answers

Bob Powell

11/29/2004 8:48:00 AM

0

Derive a new component from Panel and override the OnPaintBackground method.
Stretch the background image to suit.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tips...

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/f...

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"Patrick" <Patrick@discussions.microsoft.com> wrote in message
news:19ADD667-5B57-476A-9AAF-0BD84A622DAC@microsoft.com...
> Hi Ng,
>
> i have a background image on a panel. Now I want the image to be scaled to
> the panel size. Is this possible? Can I also make the image transparent?
>
> Thanks in advance and best regards,
> Patrick Braunschweig


patrick

11/30/2004 4:47:00 AM

0

and how do I stretch the image? I cannot just set the size??

I still have my control resizing and property grid problem. I tried to
approach you via mail bob(at)bobpowell.net, but it seems that you didn't get
it. Can I ask you some questions regarding that?

Best regards
Patrick

"Bob Powell [MVP]" schrieb:

> Derive a new component from Panel and override the OnPaintBackground method.
> Stretch the background image to suit.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tips...
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/f...
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "Patrick" <Patrick@discussions.microsoft.com> wrote in message
> news:19ADD667-5B57-476A-9AAF-0BD84A622DAC@microsoft.com...
> > Hi Ng,
> >
> > i have a background image on a panel. Now I want the image to be scaled to
> > the panel size. Is this possible? Can I also make the image transparent?
> >
> > Thanks in advance and best regards,
> > Patrick Braunschweig
>
>
>

patrick

11/30/2004 9:43:00 AM

0

ok, the stretching works fine now...

"Bob Powell [MVP]" schrieb:

> Derive a new component from Panel and override the OnPaintBackground method.
> Stretch the background image to suit.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tips...
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/f...
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "Patrick" <Patrick@discussions.microsoft.com> wrote in message
> news:19ADD667-5B57-476A-9AAF-0BD84A622DAC@microsoft.com...
> > Hi Ng,
> >
> > i have a background image on a panel. Now I want the image to be scaled to
> > the panel size. Is this possible? Can I also make the image transparent?
> >
> > Thanks in advance and best regards,
> > Patrick Braunschweig
>
>
>

Bob Powell

11/30/2004 11:48:00 AM

0

Hi Patrick,
I did get your mail, along with 500 others that day. :-)

I only have time to reply to a few and then sometimes only after several
days.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tips...

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/f...

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"Patrick" <Patrick@discussions.microsoft.com> wrote in message
news:42C16A56-1118-4E0F-A86C-A057E4B57063@microsoft.com...
> and how do I stretch the image? I cannot just set the size??
>
> I still have my control resizing and property grid problem. I tried to
> approach you via mail bob(at)bobpowell.net, but it seems that you didn't
get
> it. Can I ask you some questions regarding that?
>
> Best regards
> Patrick
>
> "Bob Powell [MVP]" schrieb:
>
> > Derive a new component from Panel and override the OnPaintBackground
method.
> > Stretch the background image to suit.
> >
> > --
> > Bob Powell [MVP]
> > Visual C#, System.Drawing
> >
> > Find great Windows Forms articles in Windows Forms Tips and Tricks
> > http://www.bobpowell.net/tips...
> >
> > Answer those GDI+ questions with the GDI+ FAQ
> > http://www.bobpowell.net/f...
> >
> > All new articles provide code in C# and VB.NET.
> > Subscribe to the RSS feeds provided and never miss a new article.
> >
> >
> >
> >
> >
> > "Patrick" <Patrick@discussions.microsoft.com> wrote in message
> > news:19ADD667-5B57-476A-9AAF-0BD84A622DAC@microsoft.com...
> > > Hi Ng,
> > >
> > > i have a background image on a panel. Now I want the image to be
scaled to
> > > the panel size. Is this possible? Can I also make the image
transparent?
> > >
> > > Thanks in advance and best regards,
> > > Patrick Braunschweig
> >
> >
> >