Click here to Skip to main content
15,887,434 members
Home / Discussions / C#
   

C#

 
QuestionAfter close MemoryStream, how to open it to read again? Pin
god4k3-Jul-04 7:17
god4k3-Jul-04 7:17 
AnswerRe: After close MemoryStream, how to open it to read again? Pin
Steven Campbell3-Jul-04 7:52
Steven Campbell3-Jul-04 7:52 
QuestionRetrieve machine names and/or IP's ..? Pin
Adel83k3-Jul-04 6:36
Adel83k3-Jul-04 6:36 
AnswerRe: Retrieve machine names and/or IP's ..? Pin
Heath Stewart5-Jul-04 6:17
protectorHeath Stewart5-Jul-04 6:17 
GeneralIDisposable, destructors and loaded assemblies Pin
Boaz V3-Jul-04 5:01
Boaz V3-Jul-04 5:01 
GeneralRe: IDisposable, destructors and loaded assemblies Pin
KevinMac4-Jul-04 9:27
KevinMac4-Jul-04 9:27 
Generaldouble buffering Pin
blankg3-Jul-04 4:43
blankg3-Jul-04 4:43 
GeneralRe: double buffering Pin
Heath Stewart5-Jul-04 6:23
protectorHeath Stewart5-Jul-04 6:23 
First of all, the ControlStyles enumeration is attributed with the FlagsAttributE (and any enumeration in the .NET base class library that is plural always does, as should other libraries when the developers follow naming guidelines), so the three lines (resulting in 3 * 4 = 12 instructions) can be done in one line (4 instructions):
SetStyle(ControlStyles.UserPaint | ControlStyles.DoubleBuffer
  | ControlStyles.AllPaintingInWmPaint, true);
This is far more efficient.

Second, when you specify these parameters you must override OnPaint and paint the text yourself. The documentation for these UserPaint and <code.allpaintinginwmpaint< code=""> state this.

Third, the <code>TextBox's text is not painted by .NET. Almost every control in Windows Forms (in the .NET BCL) wraps the native common controls equivalent. You should not try to draw these yourself because they aren't not drawn by .NET, but by Windows itself.

 

Microsoft MVP, Visual C#
My Articles
GeneralCRC check Pin
kratchkov3-Jul-04 3:51
kratchkov3-Jul-04 3:51 
GeneralRe: CRC check Pin
Paul Lyons3-Jul-04 4:38
Paul Lyons3-Jul-04 4:38 
GeneralRe: CRC check Pin
Vega023-Jul-04 4:39
Vega023-Jul-04 4:39 
Generalusing System.Runtime.Serialization.Formatters.Soap; Pin
ABean2-Jul-04 23:49
ABean2-Jul-04 23:49 
GeneralRe: using System.Runtime.Serialization.Formatters.Soap; Pin
Colin Angus Mackay3-Jul-04 0:38
Colin Angus Mackay3-Jul-04 0:38 
GeneralTextBox at run time Pin
saud_a_k2-Jul-04 22:52
saud_a_k2-Jul-04 22:52 
GeneralRe: TextBox at run time Pin
Stefan Troschuetz3-Jul-04 13:16
Stefan Troschuetz3-Jul-04 13:16 
GeneralRe: TextBox at run time Pin
saud_a_k5-Jul-04 2:18
saud_a_k5-Jul-04 2:18 
GeneralRe: TextBox at run time Pin
Stefan Troschuetz5-Jul-04 2:53
Stefan Troschuetz5-Jul-04 2:53 
GeneralDesign Issue Pin
hatim_ali2-Jul-04 18:14
hatim_ali2-Jul-04 18:14 
Generaladvantage of interface/abstract class Pin
xcavin2-Jul-04 18:12
xcavin2-Jul-04 18:12 
GeneralRe: advantage of interface/abstract class Pin
Ray Cassick2-Jul-04 18:21
Ray Cassick2-Jul-04 18:21 
GeneralRe: advantage of interface/abstract class Pin
xcavin2-Jul-04 23:34
xcavin2-Jul-04 23:34 
GeneralRe: advantage of interface/abstract class Pin
Vega023-Jul-04 4:30
Vega023-Jul-04 4:30 
GeneralDataGrid &amp; ArrayList Pin
bmasephol2-Jul-04 11:03
bmasephol2-Jul-04 11:03 
GeneralDatagrid Navigation Pin
IamADotNetGuy2-Jul-04 7:30
IamADotNetGuy2-Jul-04 7:30 
GeneralRe: Datagrid Navigation Pin
saud_a_k2-Jul-04 20:07
saud_a_k2-Jul-04 20: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.