Copyright © 2003-2005 MultiMedia Soft 
Return to index  
 
How to use Enumerations 
The use of Enumerations (also known as "enumerated types") is very important because gives more readability to your code: for this purpose we have provided a set of public Enumerations
Here follows the full list of Enumerations with the associated properties; in order to see the values defined by the Enumerations and to understand their meaning, click the associated property: 
Enumerated type
Related properties
 
 
Ctl3d.Shapes
Ctl3d.Surfaces
Ctl3d.SpecialEffects
Ctl3d.FrameEffects
Ctl3d.TranspModes
Ctl3d.Grades
Ctl3d.SpecialEffectsFactors
Ctl3d.Orientations
Ctl3d.Smooths
Ctl3d.ShadowModes
Ctl3d.TextEffects
Ctl3d.ColorRenderType
Ctl3d.ColorGradientType
Ctl3d.TextureModes
Ctl3d.CaptionAlign
Ctl3d.FocusModes
Ctl3d.PictPositions
Ctl3d.ExportImage
Ctl3d.ExportFormat
Ctl3d.Sounds
Ctl3d.TplBinTypes
Ctl3d.Pictures
Ctl3d.TranspZones
Ctl3d.LightDirections
Ctl3d.HorzAlign
Ctl3d.VertAlign
 
SAMPLES 
Here follows a brief sample of the operations needed in order to make use of Enumerations in your code inside the various development environments we have used to test our control; the samples suppose that you have inserted one instance of the control (named MyControl) inside a form and, at runtime inside the Form_Load subroutine, you need to change its shape from the Rectangle default to Ellipse. 
  • Microsoft Visual Basic.NET 
  • Microsoft Visual C#.NET 
  • Microsoft Visual J#.NET 
  •  
     
    Microsoft Visual Basic.NET 
     
    With this environment we can easily use the IntelliSense features that will help us assigning the correct value to the Shape property; after having inserted the code  
    MyControl.Shape  
    press the '=' character on your keyboard and you will see the IntelliSense display the listbox of the possible values that can be assigned to the Shape property  
     
     
     
    select the Ctl3d.Shapes.Ellipse value so the complete line of code will be: 
    MyControl.Shape = Ctl3d.Shapes.Ellipse 
     
    Microsoft Visual C#.NET 
     
    Inside this environment the IntelliSense features are less powerful than inside VB.NET, so we need a couple of line of code that were not needed with the previous environment; first of all we need to insert the following line of code at the beginning of the form management file  
    using Ctl3d; 
    this line of code will add the to the existing namespaces our component namespace
    After having inserted the code 
    MyControl.Shape 
    you will see that pressing the '=' character, unfortunately no IntelliSense will be displayed: we need to help the environment with a further information about the kind of value we want to enter; the Shape property, as you will see inside the table at the beginning of this section, is associated to the Ctl3d.Shapes enumerated type, so let's try to enter some more character inside our line of code; after having inserted the code 
    MyControl.Shape = Shapes   // Ctl3d. is not needed because we have already "using Ctl3d;" 
    press the dot '.' character and you will see the IntelliSense display the listbox of the values declared inside the Ctl3d.Shapes enumerated type 
     
    select the Shapes.Ellipse value so the complete line of code will be: 
    MyControl.Shape = Shapes.Ellipse; 
     
    Microsoft Visual J#.NET 
     
    Also with this environment, with some difference, we can use the IntelliSense features; after having inserted the code 
    MyControl 
    you will see that pressing the dot '.' character the IntelliSense will display the available wrapper functions to access the properties of the control; in our case we must scroll until we find the set_Shape function as displayed on the image below: 
     
    as you can see, the tooltip on the right of the listbox helps us understanding which enumerated type must be assigned to the property, so let's go ahead with the line of code 
    MyControl.set_Shape (Ctl3d.Shapes 
    press the dot '.' character and you will see the IntelliSense display the listbox of the values declared inside the Ctl3d.Shapes enumerated type 
     
    select the Ellipse value so the complete line of code will be: 
    MyControl.set_Shape (Ctl3d.Shapes.Ellipse); 
     
     
     
     
     
     
     
     
     
     
     
     
     
    Copyright © 2003-2005 MultiMedia Soft 
    Return to index