Click here to Skip to main content
16,020,459 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Validating a xml file Pin
Paul Watson1-Apr-03 18:17
sitebuilderPaul Watson1-Apr-03 18:17 
GeneralTextBox on Desktop Icons Pin
BennyMac24-Mar-03 11:46
BennyMac24-Mar-03 11:46 
GeneralRe: TextBox on Desktop Icons Pin
Poolbeer24-Mar-03 12:15
Poolbeer24-Mar-03 12:15 
GeneralRe: TextBox on Desktop Icons Pin
BennyMac24-Mar-03 12:32
BennyMac24-Mar-03 12:32 
GeneralRe: TextBox on Desktop Icons Pin
Poolbeer25-Mar-03 6:08
Poolbeer25-Mar-03 6:08 
GeneralRe: TextBox on Desktop Icons Pin
BennyMac25-Mar-03 11:48
BennyMac25-Mar-03 11:48 
GeneralRe: TextBox on Desktop Icons Pin
BennyMac26-Mar-03 11:33
BennyMac26-Mar-03 11:33 
GeneralRe: TextBox on Desktop Icons Pin
Oleksandr Kucherenko28-Mar-03 4:26
Oleksandr Kucherenko28-Mar-03 4:26 
txtDescription - is a TextBox control

<br />
private const int DEF_HEIGHT = 40;<br />
<br />
<br />
<br />
        using( Bitmap bmp = new Bitmap( 1, 1 ) )<br />
        {<br />
          using( Graphics g = Graphics.FromImage( bmp ) )<br />
          {<br />
            int iHeight = 0;<br />
            <br />
            // make a string a little bigger by adding "\r\nW" - this give us one line <br />
            // of free space <br />
            SizeF size = g.MeasureString( <br />
              string.Join( "\r\n", txtDescription.Lines ) + "\r\nW", <br />
              txtDescription.Font, <br />
              txtDescription.Width );<br />
<br />
            iHeight += (int)( size.Height + 0.5 );<br />
<br />
            // max size<br />
            if( iHeight > 200 )<br />
            {<br />
              txtDescription.ScrollBars = ScrollBars.Vertical;<br />
              iHeight = 200;<br />
            }<br />
            else<br />
            {<br />
              txtDescription.ScrollBars = ScrollBars.None;<br />
            }<br />
            <br />
            // min size<br />
            if( iHeight < DEF_HEIGHT ) iHeight = DEF_HEIGHT;<br />
<br />
            this.Height = iHeight;<br />
          }<br />
        }<br />
      }<br />
<br />


Good Luck
Alex Kucherenko
General.Net Compact Framework and JPG Pin
Braulio Dez24-Mar-03 3:20
Braulio Dez24-Mar-03 3:20 
GeneralRegistering a Pluggable Protocol (New) for IE Pin
Vasudevan Deepak Kumar23-Mar-03 18:55
Vasudevan Deepak Kumar23-Mar-03 18:55 
GeneralRe: Registering a Pluggable Protocol (New) for IE Pin
Stephane Rodriguez.24-Mar-03 8:38
Stephane Rodriguez.24-Mar-03 8:38 
GeneralWindows Installer Pin
Sergiu21-Mar-03 4:11
Sergiu21-Mar-03 4:11 
Generalproblem in dateTimePicker.ShowUpDown Pin
Member 28818920-Mar-03 22:06
Member 28818920-Mar-03 22:06 
GeneralRe: problem in dateTimePicker.ShowUpDown Pin
Vasudevan Deepak Kumar23-Mar-03 18:59
Vasudevan Deepak Kumar23-Mar-03 18:59 
GeneralSplitter windows Pin
Anonymous18-Mar-03 1:54
Anonymous18-Mar-03 1:54 
GeneralRe: Splitter windows Pin
leppie18-Mar-03 23:17
leppie18-Mar-03 23:17 
GeneralRe: Splitter windows Pin
d_mon19-Mar-03 7:32
d_mon19-Mar-03 7:32 
GeneralRe: Splitter windows Pin
leppie19-Mar-03 9:30
leppie19-Mar-03 9:30 
GeneralRe: Splitter windows Pin
d_mon19-Mar-03 9:39
d_mon19-Mar-03 9:39 
GeneralModifying the WSDL of an ASP.NET web service Pin
daragh18-Mar-03 1:17
daragh18-Mar-03 1:17 
QuestionWin Form Icon property bug? Pin
Anonymous17-Mar-03 2:25
Anonymous17-Mar-03 2:25 
AnswerRe: Win Form Icon property bug? Pin
leppie17-Mar-03 6:18
leppie17-Mar-03 6:18 
QuestionEditing an icon as an embedded resource? Pin
Anonymous17-Mar-03 2:06
Anonymous17-Mar-03 2:06 
AnswerRe: Editing an icon as an embedded resource? Pin
Jon Rista24-Mar-03 15:50
Jon Rista24-Mar-03 15:50 
GeneralWin 98 & PrintPreviewControl force error! Pin
Kirill.N16-Mar-03 16:45
Kirill.N16-Mar-03 16:45 

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.