Click here to Skip to main content
15,911,786 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: OpenRecordset bollocks Pin
Simon Walker15-Sep-03 2:56
Simon Walker15-Sep-03 2:56 
Generalfill Combobox with xml data Pin
14-Sep-03 22:03
suss14-Sep-03 22:03 
GeneralVB.net book suggestions.. Pin
Agnihothra14-Sep-03 20:40
Agnihothra14-Sep-03 20:40 
GeneralRe: VB.net book suggestions.. Pin
Hesham Amin14-Sep-03 21:44
Hesham Amin14-Sep-03 21:44 
GeneralRe: VB.net book suggestions.. Pin
Agnihothra14-Sep-03 23:32
Agnihothra14-Sep-03 23:32 
GeneralRegex help Pin
jholt13-Sep-03 7:25
jholt13-Sep-03 7:25 
GeneralRe: Regex help Pin
Ian Darling13-Sep-03 8:41
Ian Darling13-Sep-03 8:41 
GeneralRe: Regex help Pin
jholt13-Sep-03 9:27
jholt13-Sep-03 9:27 
Ian

You're quite right, I don't know whay hadn't thought of that before.

I wrote this which seems to work:

Public Shared Function ToParagraph(ByVal Text As String, ByVal LineLength As Integer) As String
Dim arr As String() = Text.Split(New Char() {" "c})
Dim sb As New Text.StringBuilder
Dim CurrentLine As Integer = 0

For i As Integer = 0 To arr.Length - 1
If CurrentLine + arr(i).Length + 1 <= LineLength Then
CurrentLine += (arr(i).Length + 1)
sb.Append(arr(i) & " ")
Else
CurrentLine = arr(i).Length + 1
sb.Append(vbCrLf & arr(i) & " ")
End If
Next

Return sb.ToString.TrimEnd
End Function

Regards
Jeremy
GeneralRe: Regex help Pin
Ian Darling13-Sep-03 22:49
Ian Darling13-Sep-03 22:49 
GeneralMix Managed code and unmanaged code Pin
gsmcecil13-Sep-03 6:03
gsmcecil13-Sep-03 6:03 
GeneralFAXING Pin
Anonymous13-Sep-03 4:24
Anonymous13-Sep-03 4:24 
GeneralF1 Button Pin
Emile Jacobs12-Sep-03 4:02
Emile Jacobs12-Sep-03 4:02 
Generalusing java program as server and vb as client Pin
onwebbe12-Sep-03 3:06
onwebbe12-Sep-03 3:06 
GeneralCompile exe with controls Pin
Dangleberry12-Sep-03 1:31
sussDangleberry12-Sep-03 1:31 
GeneralRe: Compile exe with controls Pin
Ray Cassick12-Sep-03 3:27
Ray Cassick12-Sep-03 3:27 
GeneralRe: Compile exe with controls Pin
Dangleberry14-Sep-03 23:43
sussDangleberry14-Sep-03 23:43 
GeneralI need an installation program to install my system Pin
Anonymous11-Sep-03 22:20
Anonymous11-Sep-03 22:20 
GeneralRe: I need an installation program to install my system Pin
Dave Kreskowiak12-Sep-03 8:04
mveDave Kreskowiak12-Sep-03 8:04 
GeneralRe: I need an installation program to install my system Pin
Hesham Amin12-Sep-03 8:06
Hesham Amin12-Sep-03 8:06 
QuestionHow do i put a webpage into a VB.Net program Pin
Anonymous11-Sep-03 21:31
Anonymous11-Sep-03 21:31 
AnswerRe: How do i put a webpage into a VB.Net program Pin
J. Dunlap11-Sep-03 22:00
J. Dunlap11-Sep-03 22:00 
GeneralQuestion on how to use two identical databases. Pin
Anonymous11-Sep-03 21:26
Anonymous11-Sep-03 21:26 
GeneralRe: Question on how to use two identical databases. Pin
Dangleberry12-Sep-03 1:41
sussDangleberry12-Sep-03 1:41 
GeneralRe: Question on how to use two identical databases. Pin
Dangleberry12-Sep-03 1:42
sussDangleberry12-Sep-03 1:42 
GeneralClosing Main Form Pin
Anonymous11-Sep-03 14:29
Anonymous11-Sep-03 14:29 

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.