Click here to Skip to main content
15,895,667 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Saving rtf-file Pin
Richard MacCutchan16-Dec-11 1:29
mveRichard MacCutchan16-Dec-11 1:29 
GeneralRe: Saving rtf-file Pin
jtpaa16-Dec-11 1:46
jtpaa16-Dec-11 1:46 
GeneralRe: Saving rtf-file Pin
Richard MacCutchan16-Dec-11 2:29
mveRichard MacCutchan16-Dec-11 2:29 
GeneralRe: Saving rtf-file Pin
Richard MacCutchan16-Dec-11 2:39
mveRichard MacCutchan16-Dec-11 2:39 
GeneralRe: Saving rtf-file Pin
jtpaa16-Dec-11 2:59
jtpaa16-Dec-11 2:59 
AnswerRe: Saving rtf-file Pin
Luc Pattyn16-Dec-11 3:41
sitebuilderLuc Pattyn16-Dec-11 3:41 
AnswerRe: Saving rtf-file Pin
Luc Pattyn17-Dec-11 3:24
sitebuilderLuc Pattyn17-Dec-11 3:24 
GeneralRe: Saving rtf-file Pin
jtpaa18-Dec-11 21:36
jtpaa18-Dec-11 21:36 
Thanks for clarifying WordPad behaviour.
So, the WordPad does not care about document page setting.

But, if the user opens document for example with MS Word, then these settings coul be used.


I managed to set the rtf-code by following way. I dont know whether it's clever way or not, but MS Word understood it and opened document in landscape.

The created and saved rtf-file is reopened, page settings are inserted into rtf-code, and finally file is saved again.

VB
Me.rtbPrint.SaveFile(Me.SaveFileDialog.FileName, RichTextBoxStreamType.RichText)
Dim FILE_NAME As String = Me.SaveFileDialog.FileName
Dim objReader As New System.IO.StreamReader(FILE_NAME)
Dim sString = objReader.ReadToEnd
objReader.Close()
sString = sString.Insert(6, "\paperw15840\paperh12240\margl720\margr144\margt720\margb288\lndscpsxn")
Dim objWriter As New System.IO.StreamWriter(FILE_NAME)
objWriter.Write(sString)
objWriter.Close()


Hope, that the code is seen properly.
AnswerRe: Saving rtf-file Pin
Luc Pattyn19-Dec-11 2:09
sitebuilderLuc Pattyn19-Dec-11 2:09 
QuestionVB.NET DevExpress XtraRichEdit Problem Pin
Framework .l.14-Dec-11 22:29
Framework .l.14-Dec-11 22:29 
AnswerRe: VB.NET DevExpress XtraRichEdit Problem Pin
Eddy Vluggen15-Dec-11 9:50
professionalEddy Vluggen15-Dec-11 9:50 
GeneralRe: VB.NET DevExpress XtraRichEdit Problem Pin
Framework .l.15-Dec-11 16:54
Framework .l.15-Dec-11 16:54 
Questionentity framework - crystal report with fields from multiple tables Pin
alejx14-Dec-11 14:50
alejx14-Dec-11 14:50 
AnswerRe: entity framework - crystal report with fields from multiple tables Pin
coded00715-Dec-11 2:54
professionalcoded00715-Dec-11 2:54 
GeneralRe: entity framework - crystal report with fields from multiple tables Pin
alejx15-Dec-11 8:36
alejx15-Dec-11 8:36 
QuestionVB Developer Interview Pin
Chris_B8414-Dec-11 5:03
Chris_B8414-Dec-11 5:03 
AnswerRe: VB Developer Interview Pin
Richard MacCutchan14-Dec-11 6:07
mveRichard MacCutchan14-Dec-11 6:07 
AnswerRe: VB Developer Interview Pin
Clark Kent12314-Dec-11 8:15
professionalClark Kent12314-Dec-11 8:15 
AnswerRe: VB Developer Interview Pin
Dalek Dave14-Dec-11 22:56
professionalDalek Dave14-Dec-11 22:56 
QuestionDataGrid always capture the arrow keys of it child controls (VB.NET, VS2008) Pin
trinh.nguyen13-Dec-11 20:31
trinh.nguyen13-Dec-11 20:31 
QuestionDateTime.Now.TimeOfDay Display Format Pin
Framework .l.12-Dec-11 15:06
Framework .l.12-Dec-11 15:06 
AnswerRe: DateTime.Now.TimeOfDay Display Format Pin
Clark Kent12313-Dec-11 3:03
professionalClark Kent12313-Dec-11 3:03 
AnswerRe: DateTime.Now.TimeOfDay Display Format Pin
Luc Pattyn13-Dec-11 19:11
sitebuilderLuc Pattyn13-Dec-11 19:11 
GeneralRe: DateTime.Now.TimeOfDay Display Format Pin
Clark Kent12314-Dec-11 1:58
professionalClark Kent12314-Dec-11 1:58 
AnswerRe: DateTime.Now.TimeOfDay Display Format Pin
Luc Pattyn14-Dec-11 8:00
sitebuilderLuc Pattyn14-Dec-11 8:00 

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.