Click here to Skip to main content
15,887,906 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralVB 6.0 Pin
Anonymous16-Apr-04 22:03
Anonymous16-Apr-04 22:03 
GeneralUnable to start debugger Pin
Qaiser_Awan16-Apr-04 19:44
Qaiser_Awan16-Apr-04 19:44 
GeneralRe: Unable to start debugger Pin
Sarvesvara (BVKS) Dasa18-Apr-04 8:30
Sarvesvara (BVKS) Dasa18-Apr-04 8:30 
Generalshow data using textbox Pin
GaryKoh16-Apr-04 17:49
GaryKoh16-Apr-04 17:49 
GeneralWindows Service Pin
Hemant Mane16-Apr-04 8:38
Hemant Mane16-Apr-04 8:38 
GeneralRe: Windows Service Pin
Dave Kreskowiak16-Apr-04 9:37
mveDave Kreskowiak16-Apr-04 9:37 
QuestionHow to hook events in add-in project Pin
skoizumi2911016-Apr-04 7:02
sussskoizumi2911016-Apr-04 7:02 
Generalhtml string writing to the file Pin
pnpfriend16-Apr-04 4:37
pnpfriend16-Apr-04 4:37 
Hello all,
I have to read the html string from email, and display it back on the internet explore.
I have no problem getting html body of the email. but displaying back is giving me trouble.
Here what I do, (i'm using vb.net)

1) read the html body from email. ebody = mail.HTMLBody
2) write to the file in two ways regualr text string and binary string so all text (in any (i don't care)language that was able to view on internet explore). As soon as I read the htmlbody, I take it and write it to the .html file so it can view on internet explore.
<br />
1) <br />
 Dim objStr As StreamWriter<br />
'creating html file<br />
objStr = New StreamWriter("c:\afile.html")  ' location could be changed<br />
objStr.WriteLine(ebody) 'writing to the file<br />
objStr.Close() 'close the file<br />
<br />
2)<br />
Dim fs As New FileStream("c:\afile.html", FileMode.Create)<br />
Dim w As New BinaryWriter(fs)<br />
w.Write(ebody)<br />
w.Close()<br />

3) display the html file with internet explore
<br />
Dim ie As New SHDocVw.InternetExplorer<br />
ie.Visible = True<br />
ie.Navigate("c:\afile.html")<br />


However the text are not displaying right if the text was written in different language other than English. Let's say the sentence is written in Chinese, then it display boxes.
I tried to write the string in both binary format, and regular format.
How can I write to the text file not changing all the text font and format?
GeneralCustom Collection, Datagrid and New Row Pin
kubikubi15-Apr-04 20:46
kubikubi15-Apr-04 20:46 
Questionhow to create a menu control in VB? Pin
donghuong15-Apr-04 20:31
donghuong15-Apr-04 20:31 
GeneralGet the HanYuPinYin from Chinese Character Pin
Nickson Koh15-Apr-04 20:31
Nickson Koh15-Apr-04 20:31 
GeneralSocket Programming in Visual Basic 6.0 Pin
Anonymous15-Apr-04 9:12
Anonymous15-Apr-04 9:12 
GeneralRe: Socket Programming in Visual Basic 6.0 Pin
Steven Campbell15-Apr-04 15:10
Steven Campbell15-Apr-04 15:10 
GeneralSource Code: Socket Programming in Visual Basic 6.0 Pin
Willian.BR16-Apr-04 2:11
sussWillian.BR16-Apr-04 2:11 
GeneralRe: Source Code: Socket Programming in Visual Basic 6.0 Pin
kishore007sai29-Dec-13 22:04
professionalkishore007sai29-Dec-13 22:04 
GeneralRe: Socket Programming in Visual Basic 6.0 Pin
Fade (Amit BS)16-Apr-04 23:22
Fade (Amit BS)16-Apr-04 23:22 
GeneralRe: Socket Programming in Visual Basic 6.0 Pin
jimpar17-Apr-04 5:08
jimpar17-Apr-04 5:08 
GeneralRe: Socket Programming in Visual Basic 6.0 Pin
kishore007sai29-Dec-13 22:05
professionalkishore007sai29-Dec-13 22:05 
Generalopen Words/Excel with button click Pin
GaryKoh15-Apr-04 7:56
GaryKoh15-Apr-04 7:56 
GeneralRe: open Words/Excel with button click Pin
-Dr_X-16-Apr-04 2:39
-Dr_X-16-Apr-04 2:39 
GeneralRe: open Words/Excel with button click Pin
GaryKoh16-Apr-04 3:23
GaryKoh16-Apr-04 3:23 
GeneralPrinting a text file with a Console Application Pin
he9ap0015-Apr-04 4:07
he9ap0015-Apr-04 4:07 
GeneralRe: Printing a text file with a Console Application Pin
e-Mickey15-Apr-04 17:59
e-Mickey15-Apr-04 17:59 
Generalgregorian date to hijrian date Pin
mmmmmmelaithy15-Apr-04 2:56
sussmmmmmmelaithy15-Apr-04 2:56 
GeneralConsuming a C# webservice from VBScript Pin
magicscreen15-Apr-04 2:51
magicscreen15-Apr-04 2:51 

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.