Text Viewer ActiveX Control

VB.NET Developer Getting Started

Assuming that you have already run the Text Viewer SDK ActiveX Control installation program and started visual studio 2010, the next step is create New Project, select Windows Form Application.

In Toolbox, Right Click mouse and Select Choose Items...  , Select Text Viewer ActiveX in COM Components Tab.

Now you will see the Text Viewer Control on Toolbox,  Drag the Text Viewer Control from Toolbox to form and add button on form.

Add following code in Button click event. It will load the text file or PDF file to viewer.

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

 AxTextReaderAx1.OpenFile("c:\temp\yourfile.txt")

End Sub


Select Project - WindowsApplication1 Properties... , select Compile Tab, select x86 on Target CPU, now run the sample, you will see it display the text file, you may add more code to add the features or click right mouse button select another features.