473,385 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Bad Flicker, TransparencyKey and ControlPaint.DrawReversibleFrame

Hello NG,

I had/have a bad flicker Problem with my Application.
On starting some applications, while my app was running, the whole Display
started to flicker. Even the desktop Icons!

Looking for help on this issue, I ran over a anser Linda Liu [MSFT] at :
http://groups.google.de/group/micros...b96b048f?hl=de

where I found the following (quick and dirty )solution to the flicker
problem which as describe is a bug in WinForms:

"In addition, The quick and dirty way to avoid most flicker is to use a
transparency key. Pick a color that won't affect your program such as lime
green, or some other ugly color that is not used by anything on your form"

Adding the transparency key to my form solved the flicker problem. No more
flicker at all, BUT:
In my app I am using the ControlPaint.DrawReversibleFram(..) method to draw
a "rubberband".

Now, with the transparency key set, the rubber band is no longer visible!

What can I do to get my rubber band back without having to live with the
flicker?

Thanks for help and hints!

Regards
Rainer Queck
Nov 11 '08 #1
8 7617
Hello Rainer,

I can reproduce this problem. When specify a TransparencyKey for the form,
the form become a layered window, it seems that
ControlPaint.DrawReversibleFrame() method draws figures beneath the layered
window. Anyway, you can call the Rectangle() API to draw the rubber band on
the form, and call ControlPaint.DrawReversibleFrame() method to draw rubber
band outside the form.

For example:

private void MyDrawReversibleRectangle(Point p1, Point p2)
{
Rectangle rc = new Rectangle();

GDI32 gdi = new GDI32();
gdi.DrawRectangle(this.CreateGraphics(), p1, p2);
// Convert the points to screen coordinates.
p1 = PointToScreen(p1);
p2 = PointToScreen(p2);
// Normalize the rectangle.
if (p1.X < p2.X)
{
rc.X = p1.X;
rc.Width = p2.X - p1.X;
}
else
{
rc.X = p2.X;
rc.Width = p1.X - p2.X;
}
if (p1.Y < p2.Y)
{
rc.Y = p1.Y;
rc.Height = p2.Y - p1.Y;
}
else
{
rc.Y = p2.Y;
rc.Height = p1.Y - p2.Y;
}
// Draw the reversible frame.
ControlPaint.DrawReversibleFrame(rc,
Color.Black, FrameStyle.Thick);
}
The GDI32 class:
public enum RasterOps
{
R2_BLACK = 1,
R2_NOTMERGEPEN,
R2_MASKNOTPEN,
R2_NOTCOPYPEN,
R2_MASKPENNOT,
R2_NOT,
R2_XORPEN,
R2_NOTMASKPEN,
R2_MASKPEN,
R2_NOTXORPEN,
R2_NOP,
R2_MERGENOTPEN,
R2_COPYPEN,
R2_MERGEPENNOT,
R2_MERGEPEN,
R2_WHITE,
R2_LAST
}

public enum BrushStyles
{
BS_SOLID = 0,
BS_NULL = 1,
BS_HATCHED = 2,
BS_PATTERN = 3,
BS_INDEXED = 4,
BS_DIBPATTERN = 5,
BS_DIBPATTERNPT = 6,
BS_PATTERN8X8 = 7,
BS_MONOPATTERN = 9
}
public enum PenStyles
{
PS_SOLID = 0,
PS_DASH = 1,
PS_DOT = 2,
PS_DASHDOT = 3,
PS_DASHDOTDOT = 4
}

class GDI32
{
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern bool Rectangle(IntPtr hdc, int X1, int Y1,
int X2, int Y2);
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern IntPtr CreatePen(PenStyles enPenStyle, int
nWidth, int crColor);
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern IntPtr CreateSolidBrush(BrushStyles
enBrushStyle, int crColor);
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern bool DeleteObject(IntPtr hObject);
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern IntPtr SelectObject(IntPtr hdc, IntPtr
hObject);
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern int SetROP2(IntPtr hdc, int enDrawMode);

protected Color borderColor;
protected Color fillColor;
protected int lineWidth;
protected IntPtr hdc, oldBrush, oldPen, gdiPen, gdiBrush;
protected BrushStyles brushStyle;
protected PenStyles penStyle;

public GDI32()
{
borderColor = Color.Transparent;
fillColor = Color.White;
lineWidth = 1;
brushStyle = BrushStyles.BS_NULL;
penStyle = PenStyles.PS_SOLID;
}

public Color BrushColor
{
get { return fillColor; }
set { fillColor = value; }
}

public BrushStyles BrushStyle
{
get { return brushStyle; }
set { brushStyle = value; }
}

public Color PenColor
{
get { return borderColor; }
set { borderColor = value; }
}

public PenStyles PenStyle
{
get { return penStyle; }
set { penStyle = value; }
}

public int PenWidth
{
get { return lineWidth; }
set { lineWidth = value; }
}

protected int GetRGBFromColor(Color fromColor)
{
return fromColor.ToArgb() & 0xFFFFFF;
}

public void DrawRectangle(Graphics g, Point p1, Point p2)
{
InitPenAndBrush(g);
Rectangle(hdc, p1.X, p1.Y, p2.X, p2.Y);
Dispose(g);
}

protected void InitPenAndBrush(Graphics g)
{
hdc = g.GetHdc();
gdiPen = CreatePen(penStyle, lineWidth,
GetRGBFromColor(PenColor));
gdiBrush = CreateSolidBrush(brushStyle,
GetRGBFromColor(fillColor));
if (PenColor == Color.Transparent) SetROP2(hdc,
(int)RasterOps.R2_XORPEN);
oldPen = SelectObject(hdc, gdiPen);
oldBrush = SelectObject(hdc, gdiBrush);
}

protected void Dispose(Graphics g)
{
SelectObject(hdc, oldBrush);
SelectObject(hdc, oldPen);
DeleteObject(gdiPen);
DeleteObject(gdiBrush);
g.ReleaseHdc(hdc);
g.Dispose();
}
}

If you have any questions or concerns, please don't hesitate to let me know.

Sincerely,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 12 '08 #2
Hello Zhi-Xin Ye,

thank you very much for your answer.
I have tried your code, but it does not work in my application if a
Transparency key is set.
With no TransparancyKey it works, but here also the DrawReversibleFrame
works.

In addition I found an other issue caused by a set TransparencyKey:
In my application I implemented the possibillity to save screenshots to a
jpg file.
Now with the TransparencyKey set I don't get a screenshot of my application,
but of every thing what is behind it.
My app - for the screenshot - is INVISIBLE!

To generate a screenshot I use the following code:

Bitmap bm = new Bitmap(this.Width, this.Height);
using (Graphics g = Graphics.FromImage(bm))
{
g.CopyFromScreen(new Point(this.Left, this.Top), new Point(0, 0), new
Size(bm.Width, bm.Height));
string savePath = Path.Combine(myPrg.screenShotPath,
String.Format("CTS_{0}.jpg", DateTime.Now.ToString
("yyyyMMdd_HHmmss")));
if (!Directory.Exists(myPrg.screenShotPath))
{
Directory.CreateDirectory(myPrg.screenShotPath);
}
bm.Save(savePath, ImageFormat.Jpeg);
}

There is one more thing I would like to mention.
With my current application, which does a lot of grafically painting I
invested a lot of energy to keep it "managed". I would therefore appreciate
a "managed" solution to the problems.

Regards
Rainer Queck
"Zhi-Xin Ye [MSFT]" <v-****@online.microsoft.comschrieb im Newsbeitrag
news:cu**************@TK2MSFTNGHUB02.phx.gbl...
Hello Rainer,

I can reproduce this problem. When specify a TransparencyKey for the form,
the form become a layered window, it seems that
ControlPaint.DrawReversibleFrame() method draws figures beneath the
layered
window. Anyway, you can call the Rectangle() API to draw the rubber band
on
the form, and call ControlPaint.DrawReversibleFrame() method to draw
rubber
band outside the form.

For example:

private void MyDrawReversibleRectangle(Point p1, Point p2)
{
Rectangle rc = new Rectangle();

GDI32 gdi = new GDI32();
gdi.DrawRectangle(this.CreateGraphics(), p1, p2);
// Convert the points to screen coordinates.
p1 = PointToScreen(p1);
p2 = PointToScreen(p2);
// Normalize the rectangle.
if (p1.X < p2.X)
{
rc.X = p1.X;
rc.Width = p2.X - p1.X;
}
else
{
rc.X = p2.X;
rc.Width = p1.X - p2.X;
}
if (p1.Y < p2.Y)
{
rc.Y = p1.Y;
rc.Height = p2.Y - p1.Y;
}
else
{
rc.Y = p2.Y;
rc.Height = p1.Y - p2.Y;
}
// Draw the reversible frame.
ControlPaint.DrawReversibleFrame(rc,
Color.Black, FrameStyle.Thick);
}
The GDI32 class:
public enum RasterOps
{
R2_BLACK = 1,
R2_NOTMERGEPEN,
R2_MASKNOTPEN,
R2_NOTCOPYPEN,
R2_MASKPENNOT,
R2_NOT,
R2_XORPEN,
R2_NOTMASKPEN,
R2_MASKPEN,
R2_NOTXORPEN,
R2_NOP,
R2_MERGENOTPEN,
R2_COPYPEN,
R2_MERGEPENNOT,
R2_MERGEPEN,
R2_WHITE,
R2_LAST
}

public enum BrushStyles
{
BS_SOLID = 0,
BS_NULL = 1,
BS_HATCHED = 2,
BS_PATTERN = 3,
BS_INDEXED = 4,
BS_DIBPATTERN = 5,
BS_DIBPATTERNPT = 6,
BS_PATTERN8X8 = 7,
BS_MONOPATTERN = 9
}
public enum PenStyles
{
PS_SOLID = 0,
PS_DASH = 1,
PS_DOT = 2,
PS_DASHDOT = 3,
PS_DASHDOTDOT = 4
}

class GDI32
{
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern bool Rectangle(IntPtr hdc, int X1, int Y1,
int X2, int Y2);
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern IntPtr CreatePen(PenStyles enPenStyle, int
nWidth, int crColor);
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern IntPtr CreateSolidBrush(BrushStyles
enBrushStyle, int crColor);
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern bool DeleteObject(IntPtr hObject);
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern IntPtr SelectObject(IntPtr hdc, IntPtr
hObject);
[System.Runtime.InteropServices.DllImportAttribute( "gdi32.dll")]
private static extern int SetROP2(IntPtr hdc, int enDrawMode);

protected Color borderColor;
protected Color fillColor;
protected int lineWidth;
protected IntPtr hdc, oldBrush, oldPen, gdiPen, gdiBrush;
protected BrushStyles brushStyle;
protected PenStyles penStyle;

public GDI32()
{
borderColor = Color.Transparent;
fillColor = Color.White;
lineWidth = 1;
brushStyle = BrushStyles.BS_NULL;
penStyle = PenStyles.PS_SOLID;
}

public Color BrushColor
{
get { return fillColor; }
set { fillColor = value; }
}

public BrushStyles BrushStyle
{
get { return brushStyle; }
set { brushStyle = value; }
}

public Color PenColor
{
get { return borderColor; }
set { borderColor = value; }
}

public PenStyles PenStyle
{
get { return penStyle; }
set { penStyle = value; }
}

public int PenWidth
{
get { return lineWidth; }
set { lineWidth = value; }
}

protected int GetRGBFromColor(Color fromColor)
{
return fromColor.ToArgb() & 0xFFFFFF;
}

public void DrawRectangle(Graphics g, Point p1, Point p2)
{
InitPenAndBrush(g);
Rectangle(hdc, p1.X, p1.Y, p2.X, p2.Y);
Dispose(g);
}

protected void InitPenAndBrush(Graphics g)
{
hdc = g.GetHdc();
gdiPen = CreatePen(penStyle, lineWidth,
GetRGBFromColor(PenColor));
gdiBrush = CreateSolidBrush(brushStyle,
GetRGBFromColor(fillColor));
if (PenColor == Color.Transparent) SetROP2(hdc,
(int)RasterOps.R2_XORPEN);
oldPen = SelectObject(hdc, gdiPen);
oldBrush = SelectObject(hdc, gdiBrush);
}

protected void Dispose(Graphics g)
{
SelectObject(hdc, oldBrush);
SelectObject(hdc, oldPen);
DeleteObject(gdiPen);
DeleteObject(gdiBrush);
g.ReleaseHdc(hdc);
g.Dispose();
}
}

If you have any questions or concerns, please don't hesitate to let me
know.

Sincerely,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support
Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

Nov 13 '08 #3
Hello Rainer,

Have you tried other ways to avoid the flicker? For example the
DoubleBuffer property or WS_EX_COMPOSITED style. You can check the
discussion in this thread:

Flicker-free painting
http://forums.microsoft.com/msdn/Sho...44742&SiteID=1

If only the TransparancyKey trick can kill the flicker on your application,
a managed way to draw the rubber band on the form is to handle the Paint
event(or override the OnPaint method) of the form, and call the
Graphics.DrawRectangle() method to draw the rubber band on the form.
However, for drawing rubber band outside the form, you can still use the
ControlPaint.DrawReversibleFrame() method.

=== Code Sample For Your Information ====

public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.TransparencyKey = Color.SaddleBrown;

this.Load += new EventHandler(Form1_Load);
}

void Form1_Load(object sender, EventArgs e)
{
MouseDown += new MouseEventHandler(MyMouseDown);
MouseUp += new MouseEventHandler(MyMouseUp);
MouseMove += new MouseEventHandler(MyMouseMove);
bHaveMouse = false;
}

protected override void OnPaint(PaintEventArgs e)
{
if (bHaveMouse)
{
using (Pen p = new Pen(Color.Black))
{
p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
//Use the DrawRectangle() method to draw a rubber band
on the form.
e.Graphics.DrawRectangle(p,
ptOriginal.X, ptOriginal.Y,
ptLast.X - ptOriginal.X, ptLast.Y - ptOriginal.Y);
}
}
base.OnPaint(e);
}

Boolean bHaveMouse;
Point ptOriginal = new Point();
Point ptLast = new Point();

// Called when the left mouse button is pressed.
public void MyMouseDown(Object sender, MouseEventArgs e)
{
// Make a note that we "have the mouse".
bHaveMouse = true;
// Store the "starting point" for this rubber-band rectangle.
ptOriginal.X = e.X;
ptOriginal.Y = e.Y;
// Special value lets us know that no previous
// rectangle needs to be erased.
ptLast.X = -1;
ptLast.Y = -1;

}
// Convert and normalize the points and draw the reversible frame.
private void MyDrawReversibleRectangle(Point p1, Point p2)
{
Rectangle rc = new Rectangle();

// Convert the points to screen coordinates.
p1 = PointToScreen(p1);
p2 = PointToScreen(p2);
// Normalize the rectangle.
if (p1.X < p2.X)
{
rc.X = p1.X;
rc.Width = p2.X - p1.X;
}
else
{
rc.X = p2.X;
rc.Width = p1.X - p2.X;
}
if (p1.Y < p2.Y)
{
rc.Y = p1.Y;
rc.Height = p2.Y - p1.Y;
}
else
{
rc.Y = p2.Y;
rc.Height = p1.Y - p2.Y;
}
// Draw the reversible frame.
ControlPaint.DrawReversibleFrame(rc,
Color.Black, FrameStyle.Dashed);
}
// Called when the left mouse button is released.
public void MyMouseUp(Object sender, MouseEventArgs e)
{
// Set internal flag to know we no longer "have the mouse".
bHaveMouse = false;
// If we have drawn previously, draw again in that spot
// to remove the lines.
if (ptLast.X != -1)
{
Point ptCurrent = new Point(e.X, e.Y);
MyDrawReversibleRectangle(ptOriginal, ptLast);
}
// Set flags to know that there is no "previous" line to
reverse.
ptLast.X = -1;
ptLast.Y = -1;
ptOriginal.X = -1;
ptOriginal.Y = -1;

this.Invalidate();
}
// Called when the mouse is moved.
public void MyMouseMove(Object sender, MouseEventArgs e)
{
Point ptCurrent = new Point(e.X, e.Y);
// If we "have the mouse", then we draw our lines.
if (bHaveMouse)
{
// If we have drawn previously, draw again in
// that spot to remove the lines.
if (ptLast.X != -1)
{
MyDrawReversibleRectangle(ptOriginal, ptLast);
}
// Update last point.
ptLast = ptCurrent;
// Draw new lines.
MyDrawReversibleRectangle(ptOriginal, ptCurrent);

this.Invalidate();
}
}
}

=============================

For generating screenshots, you can call the Form.DrawToBitmap() method
instead, for example:

private void button1_Click(object sender, EventArgs e)
{
Bitmap bmp = new Bitmap(this.Width, this.Height);
this.DrawToBitmap(bmp, new Rectangle(0, 0, this.Width,
this.Height));
bmp.Save(@"c:\test.png");
}

For more discussion on the TransparencyKey and generating screenshot, you
can read this thread:

copyFromScreen - no alpha window captured
http://forums.microsoft.com/MSDN/Sho...89138&SiteID=1

Please try my suggestions, and feel free to let me know if you have any
questions or concerns.

Have a great day!

Sincerely,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.


Nov 14 '08 #4
Hello Zhi-Xin,

some how I can't achieve a satisfying solution to my problem.
Flicker-free painting
http://forums.microsoft.com/msdn/Sho...44742&SiteID=1
I tried "2." but it did not bring the hoped for result.

On "1." I am not so sure, on how to apply the DoubleBuffering.
Could you please explainme a bit more detailed - or give me a link to a
detailed explaination - how to apply the double buffering?

Also I think, it might be a good idea to reproduce the problem with a
separate "simple" applicaton and then try the steps you described to solve
it. Currently it is kind of hard to implement your suggestions into my quite
complex application.

Regards
Rainer
Nov 17 '08 #5
Hello Rainer,

You can enable default double buffering in your forms and authored controls
in two ways. You can either set the DoubleBuffered property to true, or you
can call the SetStyle method to set the OptimizedDoubleBuffer flag to true.
Both methods will enable default double buffering for your form or control
and provide flicker-free graphics rendering.
For more information how to do this, you can refer to the following
documents:

How to: Reduce Graphics Flicker with Double Buffering for Forms and
Controls
http://msdn.microsoft.com/en-us/libr...9c(VS.80).aspx

Double Buffered Graphics
http://msdn.microsoft.com/en-us/libr...57(VS.80).aspx

If you have any questions or concerns, please don't hesitate to let me know.

Sincerely,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 18 '08 #6
Hello Zhi-Xin,

I now have managed to get the double bufferting to work and I found the
cause of my "understanding" problem.
Actualy it was no understanding problem, but a "TabControl" problem. With
the "TransparencyIssues" project which I sent you by e-mail, I realized,
that if "this.DoubleBuffered = true;" was set, wihle the TabControl existed,
the "Form1_Paint" event handler wasn't called any more. As I removed the
tabcontrol, Form1_Paint was called again.

Actually, the bad flickering problem was not solved with double buffering.
It only gets solved by setting the TransparencyKey to a Color (I sent you a
email with a 2MB avi screen video showing the flicker problem).

By the way, I managed to solve the problem the problem with the rubber band
rectangle, by drawing it directly to the bitmap. Also I solved the
screenshot problem but I had to use the following code, becaus I do not only
need the Applications main form, but also secondary windows opend by the
form at the screenshot moment:

User32.keybd_event(0x2c, 0, 0, IntPtr.Zero);
Application.DoEvents();
Image img = Clipboard.GetImage();
string savePath = Path.Combine(PrgCutSyn.screenShotPath,
String.Format("CTS_{0}.jpg",
DateTime.Now.ToString("yyyyMMdd_HHmmss")));
img.Save(savePath, ImageFormat.Jpeg);

Now that I thought, I have most of my problems solved (except of the "timer
not fired" issue) I tried my application on the target system, which is a
quite low performance industrial PC (800 MHz, 256 MB Memory). My application
now eats up all the CPU power and loads the target CPU with 100%, only
caused by the TransparencyKey !! If I do not assign a TransparencyKey, the
CPU load is at 37%.

100% is absolutely not acceptable!

So all in all I think, TransparencyKey and TabControl has MAJOR PROBLEMS!

Is there any chance to get all this issues solved some how?

Regards
Rainer
Nov 19 '08 #7
Hi Rainer,

I'm glad to hear that the rubber band and screenshot problems are solved.

For the "timer not fire" issue, you can try the SplitContainer control
instead, I've included a sample code in my email to you, please check it
and let me know the result.

Best Regards,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
Nov 20 '08 #8
Hello Zhi-Xin,

thank you very much for your help and your efforts.
I now have workarounds to all the issues in conjunction with the TabControl
and TransparencyKey and can run the application on my high performance
developement machine. But...
I can not deploy my application to the target system, because of CPU
consumption :-(
100% CPU load, only because the TransparencyKey must be set to avoid the
flicker is not acceptable!

What can I do about that now?
Is there any chance, that these bugs in the .NET Framework get solved soon?

Regards
Rainer
"Zhi-Xin Ye [MSFT]" <v-****@online.microsoft.comschrieb im Newsbeitrag
news:bO**************@TK2MSFTNGHUB02.phx.gbl...
Hi Rainer,

I'm glad to hear that the rubber band and screenshot problems are solved.

For the "timer not fire" issue, you can try the SplitContainer control
instead, I've included a sample code in my email to you, please check it
and let me know the result.

Best Regards,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no
rights.


Nov 20 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Marek Mänd | last post by:
This seems an IE issue only: 4253 bytes testcase: http://www.hot.ee/idaliiga/testcases/ieselect/bnlinkingselectinmsie.htm Can one have 1) a mouseover/mouseout element on TBODY 2) change in...
0
by: Alejandro K. | last post by:
First of all i know that this might be for the Drawing newsgroup but i posted there and got no answers so.... let see if somebody here can help me. Hi , i got some problems using Paint...
0
by: Charles Law | last post by:
The ControlPaint class looks like the ideal way to draw grab handles, a grid, and other designer-like stuff in a windows form, but I can't make it work. I realise I need to use SetStyle to set...
0
by: ddd | last post by:
Hi, I am building a simple windows form which mimics the windows media player. It user the wmplayer control, and has as transparencykey white. For some reason the player does not play the...
3
by: Per Dunberg | last post by:
Hi all, I have to develop a "skinned" application and I have a problem with the graphics. When a form is loaded and displayed there's aways a flicker where all the controls are located on the...
1
by: Brian | last post by:
If your like me, you have probably seen way too many demos of the opacity property of a form. Well I finally have a need for it and I am having an issue. I am trying to create a splash screen...
1
by: perspolis | last post by:
Hi all I used TransparencyKey in my form to hide portion of my form but when form is shown it shows flicker before displaying.. how can I remove this flicker?? thanks in advance
1
by: VMI | last post by:
I have a Windows Form and, for its BackgroundImage, I put an all-white bitmap (opened mspaint, and immediately saved as bmp). Then I set the TransparencyKey property to White (I also added it in...
0
by: Rainer Queck | last post by:
Hello NG, I had/have a bad flicker Problem with my Application. On starting some applications, while my app was running, the whole Display started to flicker. Even the desktop Icons! Looking...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.