Help with WriteLine and Font Change

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Feb 2007
Posts: 10
Reputation: Eric132 is an unknown quantity at this point 
Solved Threads: 0
Eric132 Eric132 is offline Offline
Newbie Poster

Help with WriteLine and Font Change

 
0
  #1
Feb 3rd, 2008
Hi All,

Would someone please help me with this problem I've been struggling with for a few days now.
I am trying to convert a file from this Upper Case:-

01m-matt-01-01 BIBLOS GENESEWS IHSOU XRISTOU UIOU DAUID UIOU ABRAAM

To this Lower Case into New Testament Greek:-

01m-matt-01-01 biblos genesews ihsou xristou uiou dauid uiou abraam
Sorry, the line is not showing correctly in HTML, it should be Greek characters

I can get it into Lower case but not change of font. This is the code that I have so far.

  1. Private Sub Translate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Translate.Click
  2. oFileName = filename_woExt & ".txt"
  3. Dim SR As New StreamReader(FileName) 'Input File Name
  4. Dim SW As New StreamWriter(oFileName) 'Output File Name
  5. Dim strLineData As String
  6. Dim OldFont As Font
  7. OldFont = Me.Font
  8. 'Read the contents of the input file line by line
  9. Do While SR.Peek <> -1
  10. strLineData = SR.ReadLine
  11. Dim NewFont As Font
  12. NewFont = New Font("Symbol", 10, FontStyle.Regular)
  13. strLineData = strLineData.ToLower 'Convert line to Lower Case
  14. Font = NewFont
  15. SW.WriteLine(strLineData, Font)
  16. Loop
  17. Font = OldFont
  18. SR.Close()
  19. SW.Close()
  20. 'Change the 'Start' button text to 'Done'
  21. Translate.Text = "Done" 'For this line to work the button property 'Modifiers' must be set to 'Public'
  22. End Sub
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 10
Reputation: Eric132 is an unknown quantity at this point 
Solved Threads: 0
Eric132 Eric132 is offline Offline
Newbie Poster

Re: Help with WriteLine and Font Change

 
0
  #2
Feb 5th, 2008
Hi All,
The above code actually worked. I was always opening the output file with WordPad. If I open it with NotePad the file has been transcribed correctly into greek.

Regards to All
Eric132
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 10
Reputation: Eric132 is an unknown quantity at this point 
Solved Threads: 0
Eric132 Eric132 is offline Offline
Newbie Poster

Re: Help with WriteLine and Font Change

 
0
  #3
Feb 5th, 2008
Hi All,

Just a wee update on this. Once you set the font in NotePad, all .txt files thereafter are read using that font. This may explain my results.

Eric132
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,104
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 128
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: Help with WriteLine and Font Change

 
0
  #4
Feb 6th, 2008
Self learning is the best form of learning anything and once you know that you will never forget that.
Share your Knowledge.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC