473,786 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bad Flicker, TransparencyKey and ControlPaint.Dr awReversibleFra me

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.Dr awReversibleFra m(..) 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 7690
Hello Rainer,

I can reproduce this problem. When specify a TransparencyKey for the form,
the form become a layered window, it seems that
ControlPaint.Dr awReversibleFra me() 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.Dr awReversibleFra me() method to draw rubber
band outside the form.

For example:

private void MyDrawReversibl eRectangle(Poin t p1, Point p2)
{
Rectangle rc = new Rectangle();

GDI32 gdi = new GDI32();
gdi.DrawRectang le(this.CreateG raphics(), p1, p2);
// Convert the points to screen coordinates.
p1 = PointToScreen(p 1);
p2 = PointToScreen(p 2);
// 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.Dr awReversibleFra me(rc,
Color.Black, FrameStyle.Thic k);
}
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 .DllImportAttri bute("gdi32.dll ")]
private static extern bool Rectangle(IntPt r hdc, int X1, int Y1,
int X2, int Y2);
[System.Runtime. InteropServices .DllImportAttri bute("gdi32.dll ")]
private static extern IntPtr CreatePen(PenSt yles enPenStyle, int
nWidth, int crColor);
[System.Runtime. InteropServices .DllImportAttri bute("gdi32.dll ")]
private static extern IntPtr CreateSolidBrus h(BrushStyles
enBrushStyle, int crColor);
[System.Runtime. InteropServices .DllImportAttri bute("gdi32.dll ")]
private static extern bool DeleteObject(In tPtr hObject);
[System.Runtime. InteropServices .DllImportAttri bute("gdi32.dll ")]
private static extern IntPtr SelectObject(In tPtr hdc, IntPtr
hObject);
[System.Runtime. InteropServices .DllImportAttri bute("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.Transpare nt;
fillColor = Color.White;
lineWidth = 1;
brushStyle = BrushStyles.BS_ NULL;
penStyle = PenStyles.PS_SO LID;
}

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.ToArg b() & 0xFFFFFF;
}

public void DrawRectangle(G raphics 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(penSt yle, lineWidth,
GetRGBFromColor (PenColor));
gdiBrush = CreateSolidBrus h(brushStyle,
GetRGBFromColor (fillColor));
if (PenColor == Color.Transpare nt) SetROP2(hdc,
(int)RasterOps. R2_XORPEN);
oldPen = SelectObject(hd c, gdiPen);
oldBrush = SelectObject(hd c, gdiBrush);
}

protected void Dispose(Graphic s g)
{
SelectObject(hd c, oldBrush);
SelectObject(hd c, oldPen);
DeleteObject(gd iPen);
DeleteObject(gd iBrush);
g.ReleaseHdc(hd c);
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****@microsof t.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 DrawReversibleF rame
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.Wid th, this.Height);
using (Graphics g = Graphics.FromIm age(bm))
{
g.CopyFromScree n(new Point(this.Left , this.Top), new Point(0, 0), new
Size(bm.Width, bm.Height));
string savePath = Path.Combine(my Prg.screenShotP ath,
String.Format(" CTS_{0}.jpg", DateTime.Now.To String
("yyyyMMdd_HHmm ss")));
if (!Directory.Exi sts(myPrg.scree nShotPath))
{
Directory.Creat eDirectory(myPr g.screenShotPat h);
}
bm.Save(savePat h, ImageFormat.Jpe g);
}

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.mic rosoft.comschri eb im Newsbeitrag
news:cu******** ******@TK2MSFTN GHUB02.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.Dr awReversibleFra me() 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.Dr awReversibleFra me() method to draw
rubber
band outside the form.

For example:

private void MyDrawReversibl eRectangle(Poin t p1, Point p2)
{
Rectangle rc = new Rectangle();

GDI32 gdi = new GDI32();
gdi.DrawRectang le(this.CreateG raphics(), p1, p2);
// Convert the points to screen coordinates.
p1 = PointToScreen(p 1);
p2 = PointToScreen(p 2);
// 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.Dr awReversibleFra me(rc,
Color.Black, FrameStyle.Thic k);
}
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 .DllImportAttri bute("gdi32.dll ")]
private static extern bool Rectangle(IntPt r hdc, int X1, int Y1,
int X2, int Y2);
[System.Runtime. InteropServices .DllImportAttri bute("gdi32.dll ")]
private static extern IntPtr CreatePen(PenSt yles enPenStyle, int
nWidth, int crColor);
[System.Runtime. InteropServices .DllImportAttri bute("gdi32.dll ")]
private static extern IntPtr CreateSolidBrus h(BrushStyles
enBrushStyle, int crColor);
[System.Runtime. InteropServices .DllImportAttri bute("gdi32.dll ")]
private static extern bool DeleteObject(In tPtr hObject);
[System.Runtime. InteropServices .DllImportAttri bute("gdi32.dll ")]
private static extern IntPtr SelectObject(In tPtr hdc, IntPtr
hObject);
[System.Runtime. InteropServices .DllImportAttri bute("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.Transpare nt;
fillColor = Color.White;
lineWidth = 1;
brushStyle = BrushStyles.BS_ NULL;
penStyle = PenStyles.PS_SO LID;
}

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.ToArg b() & 0xFFFFFF;
}

public void DrawRectangle(G raphics 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(penSt yle, lineWidth,
GetRGBFromColor (PenColor));
gdiBrush = CreateSolidBrus h(brushStyle,
GetRGBFromColor (fillColor));
if (PenColor == Color.Transpare nt) SetROP2(hdc,
(int)RasterOps. R2_XORPEN);
oldPen = SelectObject(hd c, gdiPen);
oldBrush = SelectObject(hd c, gdiBrush);
}

protected void Dispose(Graphic s g)
{
SelectObject(hd c, oldBrush);
SelectObject(hd c, oldPen);
DeleteObject(gd iPen);
DeleteObject(gd iBrush);
g.ReleaseHdc(hd c);
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****@microsof t.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_COMPOSITE D 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.DrawRe ctangle() method to draw the rubber band on the form.
However, for drawing rubber band outside the form, you can still use the
ControlPaint.Dr awReversibleFra me() method.

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

public partial class Form1 : Form
{
public Form1()
{
InitializeCompo nent();
this.Transparen cyKey = Color.SaddleBro wn;

this.Load += new EventHandler(Fo rm1_Load);
}

void Form1_Load(obje ct sender, EventArgs e)
{
MouseDown += new MouseEventHandl er(MyMouseDown) ;
MouseUp += new MouseEventHandl er(MyMouseUp);
MouseMove += new MouseEventHandl er(MyMouseMove) ;
bHaveMouse = false;
}

protected override void OnPaint(PaintEv entArgs e)
{
if (bHaveMouse)
{
using (Pen p = new Pen(Color.Black ))
{
p.DashStyle = System.Drawing. Drawing2D.DashS tyle.Dash;
//Use the DrawRectangle() method to draw a rubber band
on the form.
e.Graphics.Draw Rectangle(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(Obj ect 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 MyDrawReversibl eRectangle(Poin t p1, Point p2)
{
Rectangle rc = new Rectangle();

// Convert the points to screen coordinates.
p1 = PointToScreen(p 1);
p2 = PointToScreen(p 2);
// 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.Dr awReversibleFra me(rc,
Color.Black, FrameStyle.Dash ed);
}
// Called when the left mouse button is released.
public void MyMouseUp(Objec t 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);
MyDrawReversibl eRectangle(ptOr iginal, 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(Obj ect 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)
{
MyDrawReversibl eRectangle(ptOr iginal, ptLast);
}
// Update last point.
ptLast = ptCurrent;
// Draw new lines.
MyDrawReversibl eRectangle(ptOr iginal, ptCurrent);

this.Invalidate ();
}
}
}

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

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

private void button1_Click(o bject sender, EventArgs e)
{
Bitmap bmp = new Bitmap(this.Wid th, this.Height);
this.DrawToBitm ap(bmp, new Rectangle(0, 0, this.Width,
this.Height));
bmp.Save(@"c:\t est.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****@microsof t.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 OptimizedDouble Buffer 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****@microsof t.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 "understand ing" problem.
Actualy it was no understanding problem, but a "TabControl " problem. With
the "TransparencyIs sues" project which I sent you by e-mail, I realized,
that if "this.DoubleBuf fered = true;" was set, wihle the TabControl existed,
the "Form1_Pain t" 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_ev ent(0x2c, 0, 0, IntPtr.Zero);
Application.DoE vents();
Image img = Clipboard.GetIm age();
string savePath = Path.Combine(Pr gCutSyn.screenS hotPath,
String.Format(" CTS_{0}.jpg",
DateTime.Now.To String("yyyyMMd d_HHmmss")));
img.Save(savePa th, ImageFormat.Jpe g);

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****@microsof t.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.mic rosoft.comschri eb im Newsbeitrag
news:bO******** ******@TK2MSFTN GHUB02.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****@microsof t.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
3867
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 thoise event handler background colors 3) have a specified heighted SELECT element, that doesnt flicker when the event handlers are get called.
0
1305
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 event... the thing is that i got my form divided in 2 using a splitter. the splitter divides 2 Panels that are Docked to Fill inside each panel i want to draw a small grey rectangle acting like borders of the panel,it is working but if i move the...
0
1482
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 the UserPaint bit, but the method is protected on a textbox, for example, so I can't call it. If I call it for the form, and use DrawGrid, I get nothing. For example, in the form Load event
0
1020
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 video files correctly. I hear the audio part but the video part is not displayed, except some flickering iat the start. If i dont have any colors as transparencykey it works fine. How do I fix this issue?
3
3531
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 form. It seems like the controls erase the background and this cause a flicker everytime a form i loaded. When I hide and show forms that are already loaded there's no flicker, it's just when the form is loaded the first time.
1
4493
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 that looks like Adobe Acrobat's which appears to draw outside its bounds. To do this, I am setting the Transparency of the SplachScreen form to its background color and then drawing my screen (which appears to have no background). It looks really...
1
2176
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
3055
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 the Form_Load). For some reason I still can't see "through" the Form. Am I doing something wrong? The RightToLeftLayout property is set to False. On the other hand, if I remove the background image and set Form.BackColor to White, it'll work. I'm...
0
1142
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 for help on this issue, I ran over a anser Linda Liu at : http://groups.google.de/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/39e9f7d0b96b048f?hl=de where I found the following (quick and dirty )solution to the flicker
0
9655
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10363
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10169
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.