Click here to Skip to main content
15,915,501 members
Home / Discussions / C#
   

C#

 
GeneralPrinting directly on the printer Pin
Jérôme2-Jun-03 4:33
sussJérôme2-Jun-03 4:33 
GeneralRe: Printing directly on the printer Pin
Ranjan Banerji2-Jun-03 5:21
Ranjan Banerji2-Jun-03 5:21 
GeneralRe: Printing directly on the printer Pin
Anonymous2-Jun-03 23:23
Anonymous2-Jun-03 23:23 
Generaldatagrid Pin
Cristian_Dior2-Jun-03 4:26
Cristian_Dior2-Jun-03 4:26 
GeneralRe: datagrid Pin
A.Wegierski2-Jun-03 21:30
A.Wegierski2-Jun-03 21:30 
GeneralRe: datagrid Pin
Cristian_Dior3-Jun-03 20:16
Cristian_Dior3-Jun-03 20:16 
GeneralRe: datagrid Pin
A.Wegierski4-Jun-03 21:50
A.Wegierski4-Jun-03 21:50 
GeneralRe: datagrid Pin
Cristian_Dior4-Jun-03 22:10
Cristian_Dior4-Jun-03 22:10 
GeneralRe: datagrid Pin
A.Wegierski5-Jun-03 19:29
A.Wegierski5-Jun-03 19:29 
GeneralGetting the active control type Pin
lsantos20002-Jun-03 3:19
lsantos20002-Jun-03 3:19 
GeneralRe: Getting the active control type Pin
Nathan Blomquist2-Jun-03 4:16
Nathan Blomquist2-Jun-03 4:16 
GeneralRe: Getting the active control type Pin
leppie2-Jun-03 7:57
leppie2-Jun-03 7:57 
GeneralGetDlgCtrlID() API function doesn't work in .NET Pin
Roman Muntyanu2-Jun-03 3:14
Roman Muntyanu2-Jun-03 3:14 
GeneralGDI+, removinf flicker. Pin
Nigma2-Jun-03 2:17
Nigma2-Jun-03 2:17 
GeneralRe: GDI+, removinf flicker. Pin
Philip Fitzsimons2-Jun-03 2:59
Philip Fitzsimons2-Jun-03 2:59 
GeneralRe: GDI+, removinf flicker. Pin
J. Dunlap2-Jun-03 8:12
J. Dunlap2-Jun-03 8:12 
GeneralRe: GDI+, removinf flicker. Pin
James T. Johnson2-Jun-03 10:52
James T. Johnson2-Jun-03 10:52 
You should also specify AllPaintingInWmPaint and UserPaint.

The first makes it so that the PaintBackground event is called from within the Paint event instead of the windows WM_ERASEBKGND message. If you don't specify this then the PaintBackground event is fired outside of the double buffer which can have some side effects (like flicker).

The second tells the framework to use your OnPaint/Paint handler instead of letting windows do the painting.

this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint,<br />
  true);


James

"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him

GeneralC# and Managed DirectX Invalid Rectangle Pin
EvilDingo2-Jun-03 2:10
EvilDingo2-Jun-03 2:10 
GeneralRe: C# and Managed DirectX Invalid Rectangle Pin
James T. Johnson2-Jun-03 10:59
James T. Johnson2-Jun-03 10:59 
GeneralRe: C# and Managed DirectX Invalid Rectangle Pin
EvilDingo3-Jun-03 1:36
EvilDingo3-Jun-03 1:36 
GeneralRe: C# and Managed DirectX Invalid Rectangle Pin
Anonymous3-Jun-03 1:58
Anonymous3-Jun-03 1:58 
GeneralRe: C# and Managed DirectX Invalid Rectangle Pin
James T. Johnson3-Jun-03 2:00
James T. Johnson3-Jun-03 2:00 
GeneralRe: C# and Managed DirectX Invalid Rectangle Pin
EvilDingo3-Jun-03 4:27
EvilDingo3-Jun-03 4:27 
GeneralSelected row from a ListView Pin
quicksilver02022-Jun-03 1:03
quicksilver02022-Jun-03 1:03 
Generalexisting code from c++ Pin
stonee741-Jun-03 22:26
stonee741-Jun-03 22:26 

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.