Re: Shaped Forms
From: Publicjoe (mike_at_publicjoe.co.uk)
Date: 02/16/05
- Next message: Daniel Jin: "Re: Pls HELP!- DataSet Inherited object not finalizing"
- Previous message: Daniel Jin: "Re: Pls HELP!- DataSet Inherited object not finalizing"
- In reply to: Bob Powell [MVP]: "Re: Shaped Forms"
- Next in thread: Cor Ligthert: "Re: Shaped Forms"
- Reply: Cor Ligthert: "Re: Shaped Forms"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 16 Feb 2005 13:50:02 -0000
Hi Bob,
In the linked file, I use GDI+ to draw on the form.
http://www.publicjoe.f9.co.uk/csharp/code/clock3/analogclock.cs
On my other PC running XP, I get a light blue background around the clock
from the above code. On windows 2000, I see the background of the destop or
other application that is there instead. Weird!
If you could compile the code above into an app and let me know what you see
on XP, I would be grateful.
I will have a look at your code that you attached to the other email later
to see how you use a bitmap to do shaped forms.
Cheers
Publicjoe
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:O0gY3VCFFHA.3376@TK2MSFTNGP12.phx.gbl...
> What doesn't work? My shaped form with a transparency key works a treat
> under XP...
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tipstricks.htm
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/faqmain.htm
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "Publicjoe" <mike@publicjoe.co.uk> wrote in message
> news:eepxSoBFFHA.3664@TK2MSFTNGP15.phx.gbl...
> > Hi guys,
> >
> > I am writing an app that I wish to have a transparent background and
hence
> > a
> > shaped form. In the
> > InitializeComponent() method I set the members of the form to the
> > following:
> >
> > //-- Code -------------------------------------------
> >
> > this.FormBorderStyle = FormBorderStyle.None;
> > this.MaximizeBox = false;
> > this.BackColor = Color.FromArgb(((System.Byte)(128)),
> > ((System.Byte)(128)),
> > ((System.Byte)(255)));
> > this.TransparencyKey = Color.FromArgb(((System.Byte)(128)),
> > ((System.Byte)(128)), ((System.Byte)(255)));
> >
> > //-- End of Code ------------------------------------
> >
> > I am then drawing graphics of a clock as per
> > http://www.publicjoe.f9.co.uk/csharp/code/clock2/analogclock.exe
> > application.
> >
> > This works great under windows 2000, but not XP. Can someone please
point
> > me
> > in the right direction.
> >
> > Full code can be seen at
> > http://www.publicjoe.f9.co.uk/csharp/code/clock3/analogclock.cs
> >
> > Thanks in advance
> >
> > Publicjoe
> >
> >
> >
>
>
- Next message: Daniel Jin: "Re: Pls HELP!- DataSet Inherited object not finalizing"
- Previous message: Daniel Jin: "Re: Pls HELP!- DataSet Inherited object not finalizing"
- In reply to: Bob Powell [MVP]: "Re: Shaped Forms"
- Next in thread: Cor Ligthert: "Re: Shaped Forms"
- Reply: Cor Ligthert: "Re: Shaped Forms"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|