Click here to Skip to main content
15,913,854 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: reload or refresh from in another form Pin
Michael Sync9-Jan-08 22:19
Michael Sync9-Jan-08 22:19 
GeneralRe: reload or refresh from in another form Pin
break_day9-Jan-08 23:48
break_day9-Jan-08 23:48 
GeneralRe: reload or refresh from in another form Pin
Dave Kreskowiak10-Jan-08 1:56
mveDave Kreskowiak10-Jan-08 1:56 
Generalproblem with drawstring somewhere Pin
vbbeg9-Jan-08 7:58
vbbeg9-Jan-08 7:58 
GeneralRe: problem with drawstring somewhere Pin
Luc Pattyn9-Jan-08 17:57
sitebuilderLuc Pattyn9-Jan-08 17:57 
GeneralRe: problem with drawstring somewhere Pin
vbbeg9-Jan-08 18:07
vbbeg9-Jan-08 18:07 
GeneralRe: problem with drawstring somewhere [modified] Pin
Luc Pattyn10-Jan-08 1:30
sitebuilderLuc Pattyn10-Jan-08 1:30 
GeneralRe: problem with drawstring somewhere Pin
vbbeg10-Jan-08 4:47
vbbeg10-Jan-08 4:47 
Hi again Luc..

I googled and got some info about how much data a string can handle.

here: Visual Basic Language Reference
String Data Type (Visual Basic)
Holds sequences of unsigned 16-bit (2-byte) code points ranging in value from 0 through 65535. Each code point, or character code, represents a single Unicode character. A string can contain from 0 to approximately 2 billion (2 ^ 31) Unicode characters.

so im guessing its not the size of the string thats the problem..

at the moment my code is simple and here it is... please take some time to check it out and really really tell me what if a string is more than 2000 records withit everything works well and if its more its create blank pages before adding reset of the records.


here's a snipped of some code im using broken down without sub's/functions and other declaration like fonts and rectangles etc.

dim largestring as string
dim i as integer

for i=0 to 8000

largestring = largestring & "testing" & vbnewline

next i

textsize = e.Graphics.MeasureString( _
largestring, datafont, _
New SizeF(Rect.Size.Width, DateRect.Size.Height), _
datastringformat, charsfitted, linesfilled)

If charsfitted > 0 Then
e.Graphics.DrawString(largestring, datafont, Brushes.Blue, DateRect, datastringformat)

End If

If charsfitted < (largestring.Length) Then

largestring = largestring. _
Substring(charsfitted)

e.HasMorePages = True
Else
e.HasMorePages = False
headingfont.Dispose()
subheadingsfont.Dispose()
the_font.Dispose()
e.Graphics.Dispose()

End If

what is it that i need to add to make it always accept and draw no matter what records are coming through in the string. Smile | :)

thanks alot champ.. i really appreciate your time so far. Smile | :)
GeneralRe: problem with drawstring somewhere Pin
Luc Pattyn10-Jan-08 4:56
sitebuilderLuc Pattyn10-Jan-08 4:56 
GeneralRe: problem with drawstring somewhere Pin
vbbeg10-Jan-08 6:02
vbbeg10-Jan-08 6:02 
GeneralRe: problem with drawstring somewhere Pin
Luc Pattyn10-Jan-08 6:37
sitebuilderLuc Pattyn10-Jan-08 6:37 
GeneralRe: problem with drawstring somewhere Pin
Dave Kreskowiak10-Jan-08 5:12
mveDave Kreskowiak10-Jan-08 5:12 
JokeRe: problem with drawstring somewhere Pin
ChandraRam9-Jan-08 20:57
ChandraRam9-Jan-08 20:57 
GeneralRe: problem with drawstring somewhere Pin
vbbeg9-Jan-08 22:19
vbbeg9-Jan-08 22:19 
GeneralRe: problem with drawstring somewhere Pin
ChandraRam9-Jan-08 22:23
ChandraRam9-Jan-08 22:23 
GeneralRe: problem with drawstring somewhere Pin
vbbeg9-Jan-08 22:55
vbbeg9-Jan-08 22:55 
QuestionRegistry Access Problem Pin
psgeorge9-Jan-08 7:49
psgeorge9-Jan-08 7:49 
GeneralRe: Registry Access Problem Pin
Dave Kreskowiak9-Jan-08 7:59
mveDave Kreskowiak9-Jan-08 7:59 
GeneralRe: Registry Access Problem Pin
psgeorge10-Jan-08 1:35
psgeorge10-Jan-08 1:35 
QuestionRe: Registry Access Problem Pin
psgeorge11-Jan-08 1:51
psgeorge11-Jan-08 1:51 
GeneralRe: Registry Access Problem Pin
Dave Kreskowiak11-Jan-08 12:15
mveDave Kreskowiak11-Jan-08 12:15 
GeneralRe: Registry Access Problem Pin
psgeorge14-Jan-08 0:18
psgeorge14-Jan-08 0:18 
QuestionDraw a graph in VB.NET Pin
Yatish Kasa9-Jan-08 6:51
Yatish Kasa9-Jan-08 6:51 
GeneralRe: Draw a graph in VB.NET Pin
Dave Kreskowiak9-Jan-08 7:01
mveDave Kreskowiak9-Jan-08 7:01 
Generalwriting function in vb.net Pin
chandra_779-Jan-08 6:18
chandra_779-Jan-08 6:18 

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.