Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[blue]Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_USER = &H400&
Private Const EM_GETOLEINTERFACE = (WM_USER + 60)
[COLOR=green]' Loads Greek and Hebrew UTF-8 text files into an InkEdit control, using the InkEdit's TOM interface[/color]
Private Sub CommandLoad_Click()
Dim myIUnknown As IUnknown '
Dim tomDoc As ITextDocument
Dim myText As String
SendMessage InkEdit1.hwnd, EM_GETOLEINTERFACE, 0&, myIUnknown
Set tomDoc = myIUnknown
Dim objStream, strData
Set objStream = CreateObject("ADODB.Stream") [COLOR=green]' Needed so VB(A) can deal with UTYF-8[/color]
objStream.Charset = "utf-8"
objStream.Open
objStream.LoadFromFile ("g:\downloads\hebrew.txt")
myText = objStream.ReadText()
objStream.Close
tomDoc.Selection = myText
objStream.Open
objStream.LoadFromFile ("g:\downloads\greek.txt")
myText = objStream.ReadText()
tomDoc.Selection.Collapse 0
tomDoc.Selection = myText
objStream.Close
Set objStream = Nothing
End Sub[/blue]
[blue]Private Sub CommandLoad2_Click()
Dim myText As String
Dim objStream, strData
Set objStream = CreateObject("ADODB.Stream")
objStream.Charset = "utf-8"
objStream.Open
objStream.LoadFromFile ("g:\downloads\hebrew.txt")
myText = objStream.ReadText()
objStream.Close
InkEdit1.SelText = myText
objStream.Open
objStream.LoadFromFile ("g:\downloads\greek.txt")
myText = objStream.ReadText()
InkEdit1.SelText = myText
objStream.Close
Set objStream = Nothing
End Sub[/blue]