Re: Shaped Forms

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Publicjoe (mike_at_publicjoe.co.uk)
Date: 02/16/05


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
> >
> >
> >
>
>



Relevant Pages

  • Re: Shaped Forms
    ... My shaped form with a transparency key works a treat ... Find great Windows Forms articles in Windows Forms Tips and Tricks ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Shaped Forms
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... > shaped form. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: NTP client with ability to write Windows NT system time to hardware clock?
    ... working beginning in Windows Vista SP2 + Windows 7, ... system time to the hardware clock during the shut down process. ...
    (comp.protocols.time.ntp)
  • Virtual PC and real time clock lag
    ... I noticed something that is rather peculiar about Virtual PC, Windows ... PC to lose its real time clock accuracy. ... The real-time clock still ticks once per second. ... playing around with iTunes for Windows, I found that QuickTime ...
    (microsoft.public.mac.virtualpc)
  • Re: NTP client with ability to write Windows NT system time to hardware clock?
    ... working beginning in Windows Vista SP2 + Windows 7, ... system time to the hardware clock during the shut down process. ...
    (comp.protocols.time.ntp)