C# - First Application

[Top]  [Chapter]  [Previous]  [Next]

We create a new empty project and add the TextDynamic control. We also add a menu control and a status bar with 4 sub panels.


Also required is a reference to the WPDynamic namespace:




When the application runs it will look like




Now we want to add a toolbar. We use the SetLayout method to load the PCC file. We use the standard buttons.PCC file - it is in the same directory as the kernel DLL.



With licensed version please make sure you call wpdllInt1.EditorStart with your license name/key before doing anything else.  The license information is confidential and must not be made visible in the application.


using WPDynamic;


namespace WindowsFormsApplication1


  public partial class Form1 : Form


      public Form1()




          // Initialize the Editor

         // Set your License key:

           wpdllInt1.EditorStart("your_name", "your_key");

          // Load the PCC file (no password)

           wpdllInt1.SetLayout("buttons.pcc", "");

          // Initialize the editor


              // as single editor (no splitscreen)


              // with 16x16 toolbar (for 24x24 use wpmodexToolbarLG)

           EditorXMode.wpmodexToolbar |

              // and PDF, Spellcheck and table support.

           EditorXMode.wpmodexPDFExport |

           EditorXMode.wpmodexSpellcheck |


              // Select the GUI elements ruler, scrollbars and

              // the lower left panel to change zooming and layout

           EditorGUI.wpguiRuler |

           EditorGUI.wpguiHorzScrollBar |

           EditorGUI.wpguiVertScrollBar |


              // We have no second editor window, so use wpguiDontSet




At runtime the application now looks like




Now we can already load text. Even the PDF export works. (The demo version includes all options - in the full version options such as spellcheck, PDF, reporting are optional). Table support is always included.


To remove certain elements off the toolbar edit the PCC file using the Package File Manager.







[firstcapplication.htm]    Copyright © 2007 by WPCubed GmbH