This message contains graphics. If you do not see the graphics: Graphic Version.
New TX Web Site Development, Use TX In MSIE

Development Of A New TX Text Control Web Site

Our current web site has served us well for the last two years, but as with all Internet related issues, it has aged very quickly. We therefore intend to send it into retirement in a few months. In the meantime, we have started work on the next version of the web site.

While we have many ideas about what should be online and how it should be structured, the web site is for you, the programmers who employ TX Text Control. Therefore, we would like to ask you for your ideas about what we should add to (or remove from) the new web site.

How can we support you better? How can we make the information that you need easier to find?

To enable an open discussion, we have started a thread in the discussion forum, where we would be delighted to read your ideas.

Another Interesting Way To Use TX Text Control In Internet Explorer

Using TX Text Control in Microsoft Internet Explorer only makes sense if you can actually load documents that lie on other computers - for example on a file server. Microsoft provides a control that makes this task very easy.

It's called MSInet.ocx and is available for download from if it's not already installed on your machine.

The following sample is written in plain HTML using VBScript.

Here is how it works:

<OBJECT ID="Inet1" CLASSID="CLSID:48E59293-9880-11CF-9754-00AA00C00908"></OBJECT> ; <OBJECT classid="clsid:3D6D5D2F-B9F2-101C-AED5-00608CF525A5" id=objTX width="100%" height="90%"> <PARAM NAME="ViewMode" VALUE="2"> <PARAM NAME="ScrollBars" VALUE="3"> <PARAM NAME="PageWidth" VALUE="12000"> <PARAM NAME="PageHeight" VALUE="16000"> <PARAM NAME="Text" VALUE="TX Text Control ActiveX in Internet Explorer"> </OBJECT>

In addition to the TX Text Control control, an Inet control is placed in the HTML code. It will not be visible later on, but we can use it to perform a variety of tasks. This example will only show how to download documents using HTTP, but FTP is possible as well.

Three buttons are also placed in the HTML file. Here are their event handlers:

Sub GetTXT_onClick() Dim strData strData = Inet1.OpenURL("", icString) objTX.LoadFromMemory strData, 1, False End Sub Sub GetHTM_onClick() Dim strData strData = Inet1.OpenURL("", icString) objTX.LoadFromMemory strData, 4, False End Sub Sub GetRTF_onClick() Response = Inet1.Execute("", "GET") If Inet1.ResponseCode <> 0 Then MsgBox ("ErrorCode: " & Inet1.ResponseCode) MsgBox ("Error: " & Inet1.ResponseInfo) End If End Sub

In the first two handlers the Inet control's OpenURL method is used to download a file into a variable. This variable is then loaded into the TX Text Control using TX's LoadFromMemory method.

The third handler shows another way of loading a file. It uses the Inet Control's Execute method. The difference between the two methods is that the OpenURL method does not return until the file is downloaded. So, the application seems to hang. The execute method lets the Inet control send a message when data arrives. Here is the handler for this message:

Sub Inet1_StateChanged(State) Select Case State ' ... Other cases not shown. Case 12 ' icResponseCompleted Dim strData: StrData = "" Dim vtData ' Get first chunk. vtData = Inet1.GetChunk(10240, icString) Do While Len(vtData) <> 0 strData = strData & vtData ' Get next chunk. vtData = Inet1.GetChunk(10240, icString) Loop objTX.LoadFromMemory strData, 5, False End Select End Sub

The Inet control has 12 states. In this example only state no. 12 is of interest. When the control has reached this state, all data is downloaded. Using the GetChunk method, the data is stored in a variable and then loaded into TX Text Control with the LoadFromMemory method.

As soon as you try out this simple example, you will see that it is pretty easy to load documents from a server. Now it is up to your creativity to create an interesting distributed application. Why not let us know of your progress? We could even feature your code snippet in a later newsletter.

Notable Link Of The Week: Software Paradise

Founded in 1986 and trading online since early 1997, Software Paradise Is one of the U.K's premier mail-order and online resellers. Their catalog lists over 250,000 products including software, games and leisure titles, development tools, components, Electronic Software Download (ESD) titles, hardware, DVD movies, books and more. Take a look at what they have on offer:

Best regards

The Newsletter Team

Text Control GmbH respects your online time and privacy. We only send this newsletter to TX Text Control customers and people who have signed up to receive it. However, if you would prefer not to receive future issues of the newsletter, you may unsubscribe at any time. If you received this newsletter forwarded from a colleague or friend, you may wish to subscribe directly.

Sent to: N/A.

Imprint | Unsubscribe | Subscribe

© 2020 Text Control GmbH. All Rights Reserved.