VBTrain.Net Graphical Text Object Part 1: Working Through the Demo Project TUTORIAL BY Dr. med. Cecil Cheah 03 March 2004 Page 1 of 15 Table of Content STARTING THE DEMO 3 SETTING THE REFERENCE TO THE GRAPHICAL TEXT OBJECT 5 To delete the old reference: 5 To add a new reference 5 Adding new reference from the Toolbox 5 new reference fr Menu 7 Adding new reference from the Solution Explorer 9 GETTING TO KNOW THE GRAPHICAL TEXT OBJECT 10 The Automated Demo 10 The Manual Demo 11 Text 11 Rotation Angle 11 Sizing Method 11 Size to Control 11 Size To Font, No Wrap 11 o Font, Wrap 12 Control Size 12 Visible Region 13 Control 13 Text 13 Text Rectangle 13 Primary Text Colour 13 Effect 14 Linear Gradient 14 Path Gradient Rectangle 14 Solid 14 Texture 14 Control Backcolour 15 HOW TO CONTACT ME 15 Page 2 of 15 Starting the demo Let us examine the Demo first before we actually make one ourselves. After installation of the VBTrain Graphical Text Object, you will see in the Product folder two subfolders: • GraphicalText_Demo • WebGraphicalText_Demo This tutorial will walk you through the Graphical Text Object. Look under the GraphicalText_Demo Folder for the file GraphicalText_Demo.sln. Double click to start the Visual Studio Net and open the GraphicalText_Demo. After a few seconds, you will probably see the following screen. Click “Form1.vb” in the Solution Explorer window, and then click the “View ...
Part 1: Working Through the Demo Project TUTORIAL BY Dr. med. Cecil Cheah
03 March 2004
Page 1 of 15
Table of Content
STARTING THE DEMO SETTING THE REFERENCE TO THE GRAPHICAL TEXT OBJECT To delete the old reference: To add a new reference Adding new reference from the Toolbox Adding new reference from the Menu Adding new reference from the Solution Explorer GETTING TO KNOW THE GRAPHICAL TEXT OBJECT The Automated Demo The Manual Demo Text Rotation Angle Sizing Method Size to Control Size To Font, No Wrap Size To Font, Wrap Control Size Visible Region Control Text Text Rectangle Primary Text Colour Effect Linear Gradient Path Gradient Rectangle Solid Texture Control Backcolour HOW TO CONTACT ME
Starting the demo Let us examine the Demo first before we actually make one ourselves. After installation of the VBTrain Graphical Text Object, you will see in the Product folder two subfolders: • GraphicalText_Demo ebGraphi _ • W calText Demo This tutorial will walk you through the Graphical Text Object. Look under the GraphicalText_Demo Fo ap _Demo.sln. Double click to lder for the file Gr hicalText start the Visual Studio Net and open the GraphicalText_Demo. After a few seconds, you will probably see the following screen.
Click Form1.vb in the Solution Explorer window, and then click the View Designer icon
Page 3 of 15
The Form1 will app
ear.
P
age 4
of 15
Setting the Reference to the Graphical Text Object In the readme.txt file that comes with your product, Platte Canyon advises you to delete the reference to the Graphical Text Object inside this Demo Project File. My personal experience is it does not matter if you delete the reference or not. This is because if you create a new reference to the same object, Visual Basic Net will automatically replace the old reference with the new one. To delete the old reference: If you open the References in the Solution Explorer, you will see a reference to the VBTrain Graphical Text Object.
You can either delete this reference now (right click and choose delete option) as indicated in the readme.txt that comes with the Product. To add a new reference We will need to add the reference to the VBTrain Graphical Text Object ourselves. There are three ways of doing this. 1. Adding new reference from the Toolbox Right click on the Toolbox and select Customize Toolbox menu option.
Page 5 of 15
Choose the .Net Framework Components Tab.
Choose Browse
Page 6 of 15
Navigate to the Product directory, and then the Graphical Text subdirectory and locate the VBTrainGraphicalText.dll file. Click Open.
2. Adding new reference from the Menu Alternatively, to add a reference to the Graphical Text VBTrain Object, from the menu, choose Project, and then choose Add Reference.
Page 7 of 15
In the next screen, choose .Net tab if it not already chosen.
Click Browse, and again locate the VBTrainGraphicalText.dll file in the Product\ Graphical Text subdirectory and then click Open, then OK.
Page 8 of 15
3. Adding new reference from the Solution Explorer From inside the Solution Explorer, click to select the References, and then right click to open the option menu.
Choose the Add Reference option. Repeat step 2 above. If you did not delete the reference at the beginning, you may see the following Message box.
Click OK to continue. If everything is done correctly you should now see the VBTrain Graphical Text Object inside Form 1 which you have paid so much money for.
Page 9 of 15
Getting to know the Graphical Text Object Now I guess you would want to see the VBTrain Graphical Text in action right away. In the solution configurations, choose Debug and then click the Run button on its left.
This is what you can see now in the Debug mode.
The Automated Demo Click the Start Automated Demo button to set the demo in action in an automated mode.
The following is what you will discover from the automated demo about the capability of the VBTrain Graphical Text Object. • The Text can be rotated The Text can be changed • • The Font Colour of the text can be changed • The Back Colour of the text field can be changed • The Size of the text field can be changed • The Sizing method can be changed • The Text Effect can be changed • The Visible Region of the text field can be changed
Page 10 of 15
The Manual Demo You can also try to change each one manually and see what it does. 1. Text Try changing the Text itself from Graphical Text to Hello World and see what it does. Remember to press enter after each change.
2. Rotation Angle Change the Rotation Angle from 0 to 45
to
to
3. Sizing Method There are three options for the Sizing Method. -Size To Control -Size To Font, No Wrap Size To Font, Wrap -To see the difference, try each one in turn. With the control Size set at 260.59 Size to Control: