Click here to Skip to main content
15,902,114 members
Home / Discussions / C#
   

C#

 
AnswerRe: drag&drop Pin
_mubashir11-Apr-07 1:29
_mubashir11-Apr-07 1:29 
QuestionC# and COM for x64 Pin
Simon D Smart11-Apr-07 0:26
Simon D Smart11-Apr-07 0:26 
AnswerRe: C# and COM for x64 [modified] Pin
Ed.Poore11-Apr-07 1:20
Ed.Poore11-Apr-07 1:20 
GeneralRe: C# and COM for x64 Pin
Simon D Smart11-Apr-07 5:40
Simon D Smart11-Apr-07 5:40 
Questionhow to find the error in xml file in C#. Pin
gpremkamal10-Apr-07 23:33
gpremkamal10-Apr-07 23:33 
AnswerRe: how to find the error in xml file in C#. Pin
blackjack215010-Apr-07 23:47
blackjack215010-Apr-07 23:47 
AnswerRe: how to find the error in xml file in C#. Pin
Stevo Z11-Apr-07 2:57
Stevo Z11-Apr-07 2:57 
AnswerRe: how to find the error in xml file in C#. Pin
Jaiprakash M Bankolli11-Apr-07 3:20
Jaiprakash M Bankolli11-Apr-07 3:20 
QuestionUML in visula studio 2005 Pin
aminowest10-Apr-07 23:13
aminowest10-Apr-07 23:13 
AnswerRe: UML in visula studio 2005 Pin
Pete O'Hanlon10-Apr-07 23:31
mvePete O'Hanlon10-Apr-07 23:31 
AnswerRe: UML in visula studio 2005 Pin
Jaiprakash M Bankolli11-Apr-07 3:22
Jaiprakash M Bankolli11-Apr-07 3:22 
AnswerRe: UML in visula studio 2005 Pin
Morantex11-Apr-07 7:56
Morantex11-Apr-07 7:56 
Questionreference problem, plz help Pin
akkram10-Apr-07 23:00
akkram10-Apr-07 23:00 
AnswerRe: reference problem, plz help Pin
Christian Graus10-Apr-07 23:06
protectorChristian Graus10-Apr-07 23:06 
GeneralRe: reference problem, plz help Pin
akkram10-Apr-07 23:33
akkram10-Apr-07 23:33 
QuestionPicture in DataGrid With Every Category Pin
sheebalam11110-Apr-07 22:47
sheebalam11110-Apr-07 22:47 
AnswerRe: Picture in DataGrid With Every Category Pin
Christian Graus10-Apr-07 22:50
protectorChristian Graus10-Apr-07 22:50 
GeneralRe: Picture in DataGrid With Every Category Pin
sheebalam11110-Apr-07 22:57
sheebalam11110-Apr-07 22:57 
GeneralRe: Picture in DataGrid With Every Category Pin
Christian Graus10-Apr-07 23:05
protectorChristian Graus10-Apr-07 23:05 
Questionhelp here...open file from different directory Pin
Missy Glory10-Apr-07 22:35
Missy Glory10-Apr-07 22:35 
AnswerRe: help here...open file from different directory Pin
Christian Graus10-Apr-07 22:42
protectorChristian Graus10-Apr-07 22:42 
Questionhow to create Control Array in ASp.net(web) form using c# Pin
jaganil10-Apr-07 22:22
jaganil10-Apr-07 22:22 
AnswerRe: how to create Control Array in ASp.net(web) form using c# Pin
Christian Graus10-Apr-07 22:29
protectorChristian Graus10-Apr-07 22:29 
QuestionTransparency in windows forms - doesn't work on some pcs Pin
Delta-Z10-Apr-07 21:59
Delta-Z10-Apr-07 21:59 
Hi I have created an application with transparent main window that displays some text. To initially display and change the text, I use the following code:
if (behavior.IsVisible)
{
                Show();
                mImage = new Bitmap(Width, Height);
                Graphics dc = Graphics.FromHwnd(Handle);
                dc.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
                SizeF size = dc.MeasureString(behavior.DisplayText, behavior.Font);
                dc.Dispose();

                Height = (int)size.Height + 1;
                Width = (int)size.Width + 1;
                mImage = new Bitmap(Width, Height);
                dc = Graphics.FromImage(mImage);
                dc.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;

                Color background = (behavior.Color.ToArgb() == Color.White.ToArgb()) ? Color.Black : Color.White;
                dc.Clear(background);

                dc.DrawString(behavior.DisplayText, behavior.Font, new SolidBrush(behavior.Color), 0, 0);
                mTextColor = behavior.Color.ToArgb();

                dc.Dispose();

                BackgroundImage = mImage;
                TransparencyKey = background;
}
else
{
                Hide();
                BackgroundImage = null;
}


For some reason the window shows transparent on my PC and at least one other, while on most I still get a white background (i.e. no transparency). The only difference I can think of is that on the PCs where the transparency displays correctly, VS2005 is installed, while it's VS2003 or none on the others (I'm using latest video drivers etc).
Does anyone know of this issue and how to fix it?



Thanks,
Dmitry
AnswerRe: Transparency in windows forms - doesn't work on some pcs Pin
blackjack215010-Apr-07 22:07
blackjack215010-Apr-07 22:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.