|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
streamwriterbonjour
why chr(9) don't work in streamwriter : in the code : For lPointer = 1 To Val(txtWordCount.Text) 'w.WriteLine(aryListBox(lPointer)) w.Write(lPointer.ToString & ")" & aryListBox(lPointer) & ChrW(9)) Next thanks for help Standard question #1:
What do you mean by "not working"? Standard question #2: What error message do you get? Pascal wrote: Show quoteHide quote > bonjour > > why chr(9) don't work in streamwriter : > > in the code : > For lPointer = 1 To Val(txtWordCount.Text) > > 'w.WriteLine(aryListBox(lPointer)) > > w.Write(lPointer.ToString & ")" & aryListBox(lPointer) & ChrW(9)) > > Next > > thanks for help > > bonjour
when i use the code, there is no error message. in the rtb (where i load the txt document i made before with this code, all the words from my list appear in the correct way like this: Mots à trouver : 1)PARLONS 2)PRENONS 3)SACHONS 4)ALLONS 6)PARLEZ 7)PRENDS 8)SACHEZ 9)SOYONS but when i use the print preview form all the tabs seem to have disappear... like this : Mots à trouver : 1)PARLONS 2)PRENONS 3)SACHONS 4)ALLONS 6)PARLEZ 7)PRENDS 8)SACHEZ 9)SOYONS But when i print this document.txt with another software like notepad++ everything is allwright. It seems to be a problem with the setting of the printpreview form ? perhaps i have to tell the form to use the fixed font courrier ? but i don't know how... http://www.scalpa.info Ok, so the problem is not with the StreamWriter at all, it's with the
method that you use to print the result... Why didn't I understand that from your original post? ;) Do you have any reference that says that it should support tab characters at all? When you print the file with some other software, that software formats the printout the same way as it handles the tab characters when it displays the file on screen. If tab characters are handled, they can either be treated as moving forward to the next tab stop (often evenly spaced across the page) or like wide space characters, for an example having the width of three space characters. There is nothing magical about tab characters that just works, it has to be handled by the software, and it's up to the creator of the software to decide how to handle it. Pascal wrote: Show quoteHide quote > bonjour > > when i use the code, there is no error message. in the rtb (where i load > the txt document i made before with this code, all the words from my > list appear in the correct way like this: > > > Mots à trouver : > > 1)PARLONS 2)PRENONS 3)SACHONS 4)ALLONS > > 6)PARLEZ 7)PRENDS 8)SACHEZ 9)SOYONS > > but when i use the print preview form all the tabs seem to have > disappear... like this : > > Mots à trouver : > > 1)PARLONS 2)PRENONS 3)SACHONS 4)ALLONS > 6)PARLEZ 7)PRENDS 8)SACHEZ 9)SOYONS > > But when i print this document.txt with another software like notepad++ > everything is allwright. It seems to be a problem with the setting of > the printpreview form ? perhaps i have to tell the form to use the fixed > font courrier ? but i don't know how... > > http://www.scalpa.info hi
So if I understood, i have to write some code in the printpreview form to handle the tab ? What kind of code and where : in the PrintDocument ? thanks for your help http://www.scalpa.info I suggest that you first look up if the preview handles tab characters
or not. Then you decide if it handles them the way you want, or if it doesn't, how you want to handle them. Pascal wrote: Show quoteHide quote > hi > > So if I understood, i have to write some code in the printpreview form to > handle the tab ? What kind of code and where : in the PrintDocument ? > thanks for your help > http://www.scalpa.info > >
How does this work?
Hiding MDI forms Argument out of range exception Setup questions Something tricky! change DataSet Row background color Response.Redirect not being called after sending an email missing System.Security.Cryptography.Xml namespace vb2005 - how to rehide Form constructor after exposing it? -not co REGISTRY - TemporaryInternetFiles |
|||||||||||||||||||||||