Click here to Skip to main content
15,894,405 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: GridView or DetailsView results e-mailed Pin
Learning15-Apr-08 4:29
Learning15-Apr-08 4:29 
QuestionNetworkstream receiving same data twice [modified] Pin
evdsande14-Apr-08 10:05
evdsande14-Apr-08 10:05 
Questionis Microsoft.ApplicationBlocks.Data.dll compatible to VS2005? Pin
Mustanseer M S13-Apr-08 21:26
Mustanseer M S13-Apr-08 21:26 
GeneralRe: is Microsoft.ApplicationBlocks.Data.dll compatible to VS2005? Pin
Dave Kreskowiak14-Apr-08 3:30
mveDave Kreskowiak14-Apr-08 3:30 
GeneralRe: is Microsoft.ApplicationBlocks.Data.dll compatible to VS2005? Pin
Christian Graus14-Apr-08 4:27
protectorChristian Graus14-Apr-08 4:27 
GeneralRe: is Microsoft.ApplicationBlocks.Data.dll compatible to VS2005? Pin
Pete O'Hanlon14-Apr-08 4:36
mvePete O'Hanlon14-Apr-08 4:36 
GeneralRe: is Microsoft.ApplicationBlocks.Data.dll compatible to VS2005? Pin
Dave Kreskowiak14-Apr-08 5:34
mveDave Kreskowiak14-Apr-08 5:34 
Questionhow can I set TextBox.ScrollBars to None or Both at call Pin
Shimmy Weitzhandler12-Apr-08 16:03
Shimmy Weitzhandler12-Apr-08 16:03 
I want to create a method that maked the scrollbars of a textbox control visible only if needed.

I tried to use the following method but it doesn't always work, because some times is the control's width much bigger than the Height (I am talking when the WordWrap is set to False):

Private Sub TextBox1_TextChanged(ByVal sender As TextBox, ByVal e As System.EventArgs) _<br />
    Handles TextBox1.TextChanged, TextBox1.Resize, TextBox1.FontChanged<br />
<br />
        Dim fS As Size = TextRenderer.MeasureText(sender.Text, sender.Font)<br />
        Dim cS As Integer = fS.Height * fS.Width<br />
        Dim dS As Integer = sender.Size.Height * sender.Size.Width<br />
        If dS < cS Then<br />
            sender.ScrollBars = ScrollBars.Both<br />
        Else<br />
            sender.ScrollBars = ScrollBars.None<br />
        End If   <br />
End Sub


so here is some findings about the text box's control behaviour, maybe it's gonna be useful:
	these numbers just bellow (123456) charachterize th number of lines
        1 	2 	3 	4 	5 	6 	

10	6	22	38	54	70	86	16^
11	6	24	42	60	78	96	18^
12	6	26	46	66	86	106	20^
13	6	28	50	72	94	126	22^
	0	2	4	6	8	10	  ^the numbers in this col. are the control's increment per font against line
^this column is the textbox's font's size

the numbers within the table (6,22,38~72,94,126) are the Size.Height of the control, corresponding to font size and line numbers.


well I don't want to waste your time,
does any body have any solution?

thanks for your time.

Shimi

GeneralRe: how can I set TextBox.ScrollBars to None or Both at call Pin
Shimmy Weitzhandler12-Apr-08 18:45
Shimmy Weitzhandler12-Apr-08 18:45 
QuestionIs DoDirectPayment method of PayPal applicable in Australia Pin
samrat.net10-Apr-08 23:30
samrat.net10-Apr-08 23:30 
GeneralRe: Is DoDirectPayment method of PayPal applicable in Australia Pin
Christian Graus11-Apr-08 2:13
protectorChristian Graus11-Apr-08 2:13 
Generalwhat's new in dotnet framework 2.0 architecture compared to dotnet framework 1.1 architecture Pin
padma p10-Apr-08 23:24
padma p10-Apr-08 23:24 
GeneralRe: what's new in dotnet framework 2.0 architecture compared to dotnet framework 1.1 architecture Pin
Thomas Stockwell11-Apr-08 1:21
professionalThomas Stockwell11-Apr-08 1:21 
GeneralRe: what's new in dotnet framework 2.0 architecture compared to dotnet framework 1.1 architecture Pin
Dave Kreskowiak11-Apr-08 6:58
mveDave Kreskowiak11-Apr-08 6:58 
GeneralXmlTextReader - try again Pin
coleydog10-Apr-08 19:05
coleydog10-Apr-08 19:05 
GeneralRe: XmlTextReader - try again Pin
Christian Graus10-Apr-08 20:35
protectorChristian Graus10-Apr-08 20:35 
GeneralRe: XmlTextReader - try again Pin
Mark J. Miller14-Apr-08 5:50
Mark J. Miller14-Apr-08 5:50 
GeneralRe: XmlTextReader - try again Pin
coleydog16-Apr-08 14:08
coleydog16-Apr-08 14:08 
GeneralXmlTextReader - Child elements. Pin
coleydog10-Apr-08 18:59
coleydog10-Apr-08 18:59 
GeneralRe: XmlTextReader - Child elements. Pin
Dave Kreskowiak11-Apr-08 7:04
mveDave Kreskowiak11-Apr-08 7:04 
GeneralRe: XmlTextReader - Child elements. Pin
coleydog11-Apr-08 15:02
coleydog11-Apr-08 15:02 
GeneralRe: XmlTextReader - Child elements. Pin
Dave Kreskowiak11-Apr-08 18:14
mveDave Kreskowiak11-Apr-08 18:14 
Generalhi travel to assembly Pin
sujithkumarsl10-Apr-08 17:53
sujithkumarsl10-Apr-08 17:53 
GeneralRe: hi travel to assembly Pin
Dave Kreskowiak11-Apr-08 6:59
mveDave Kreskowiak11-Apr-08 6:59 
QuestionConverting Word .doc to image file Pin
kensai10-Apr-08 1:38
kensai10-Apr-08 1:38 

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.