www.gnostice.com 

Microsoft Visual Studio .NET

Top  Previous  Next

Steps for Microsoft Visual Studio .NET

 

 

 

1.Start Visual Studio .NET and on File menu, choose New, then choose Project.

 

 

VisualStudioN_Figure 1 - New Project

 

 

 

2.Select Visual VB Projects for VB application and Visual C# Projects for Visual C# application from the Project Types list and Windows Application from the Templates list. Enter the project Name, select the Location and click OK.

 

 

 

Visual Basic

 

 

 

VisualStudioN_Figure 2 - VB - New Project with Templates

 

 

 

 

Visual C#

 

 

 

VisualStudioN_Figure 2 - VC - New Project with Templates

 

 

 

 

 

3.        As per the selection of the application, the User Form dialog is displayed.

 

 

 

Visual Basic

 

 

VisualStudioN_Figure 3 - VB - WindowsApplication1

 

 

 

 

Visual C#

 

 

 

VisualStudioN_Figure 3 - VC - WindowsApplication1

 

 

 

4.Select Toolbox from View menu.

 

 

 

VisualStudioN_Figure 4 - View ToolBox

 

 

 

5.        To insert eDocEgnine ActiveX controls, there are two ways:

 

 

 

i) To insert controls through the Toolbox:

 

 

 

a)Secondary click (right click) and select Add Tab from the list. A textbox appears at the bottom of the Toolbox wherein you can enter the name for the tab. Name the tab as Gnostice eDocEngine.

 

 

 

VisualStudioN_Figure 5 - Add Tab

 

 

 

b)Secondary click the tab Gnostice eDocEngine.  Select Customize Toolbox option from the list. A Customize Toolbox dialog is displayed. Select COM Components tab from the options. Select the required Gnostice eDocEngine controls from the list and click OK.

 

VisualStudioN_Figure 10 - After Add Reference

 

 
 
c)The Toolbox contains the list of "Gnostice eDocEngine" controls.

 

 

VisualStudioN_Figure 18 - Customize tool list box

 

 

 

d)Drop the control on the user form and double click on the control; you can start writing code as per the selection of the application.

 

 

 

 

Visual Basic

 

 

 

 

 

VisualStudioN_Figure 8 - VB - PDF Form

 

 

 

 

 

 

Visual C#

 

 

 

 

 

VisualStudioN_Figure 8 - PDF form

 

 

 

 

e)The following sample code will create Hello World in the document when ".ocx" file is used:

 

 

 

Visual Basic

 

 

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

AxgtPDFEngineX1.FileName = "Sample"

AxgtPDFEngineX1.ActivateLicense "Enter The Licensekey String Here" 

AxgtPDFEngineX1.BeginDoc()

AxgtPDFEngineX1.TextOutXY(1, 1, "Hello World")

AxgtPDFEngineX1.EndDoc()

End Sub

 

 

 

Visual C#

 

 

private void axCommandButton1_Enter(object sender, System.EventArgs e)

{

axgtEngineX1.FileName = "Sample";

axgtPDFEngineX1.ActivateLicense("Enter The Licensekey String Here") ;

axgtEngineX1.BeginDoc();

axgtEngineX1.TextOutXY (1,1, "Hello World");

axgtEngineX1.EndDoc();

}

 

 

 

OR

 

ii) To insert controls through Code:

 

a)To add Gnostice eDocEngine controls through code secondary click (right click) the Solution Explorer - WindowsApplication1. Select Add Reference from options.

 

VisualStudioN_Figure 7 - Add Reference

 
 
 
b)Select .Net tab from Add Reference dialog. Browse and select the .dll from <eDocEngine InstallDir>\Bin\.Net\eDocEngineX.dll.

 

 

 

VisualStudioN_5_ii_b

 

 

c)You can start writing code. The following sample code will create Hello World in the document when ".dll" file is used:

 

 

 

Visual Basic

 

 

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

Dim AxgtPDFEngineX1 As New gtPDFEngineXClass()

AxgtPDFEngineX1.FileName = "Sample"

AxgtPDFEngineX1.ActivateLicense "Enter The Licensekey String Here" 

AxgtPDFEngineX1.BeginDoc()

AxgtPDFEngineX1.TextOutXY(1, 1, "Hello World")

AxgtPDFEngineX1.EndDoc()

End Sub

 

 

 

Visual C#

 

 

private void axCommandButton1_Enter(object sender, System.EventArgs e)

{

gtPDFEngineX axgtEngineX1;

axgtEngineX1 = new gtPDFEngineXClass();

axgtEngineX1.FileName = "Sample";        

axgtPDFEngineX1.ActivateLicense("Enter The Licensekey String Here");        

axgtEngineX1.BeginDoc();

axgtEngineX1.TextOutXY (1,1, "Hello World");

axgtEngineX1.EndDoc();

}

       

 

 

top of the page hyperlink