Lanap.BotDetect.TextStyleEnum Reference

Lanap.BotDetect.TextStyleEnum contains all valid values of the Lanap.BotDetect.Captcha control's TextStyle property. It represents the distortion algorithm used for rendering of CAPTCHA images.

Members

[VB.NET]

Public Enum TextStyleEnum
  AncientMosaic
  BlackOverlap
  Bullets
  Bullets2
  CaughtInTheNet
  CaughtInTheNet2
  Chalkboard
  Chess
  Chess3D
  Chipped
  Circles
  Collage
  Corrosion
  CrossShadow
  CrossShadow2
  Cut
  Darts
  Distortion
  FingerPrints
  Flash
  Ghostly
  Graffiti
  Graffiti2
  Halo
  InBandages
  Jail
  Lego
  Mass
  MeltingHeat
  Negative
  Overlap
  Overlap2
  PaintMess
  Rough
  Spiderweb
  Split
  Snow
  Stitch
  Strippy
  SunAndWarmAir
  SunRays
  SunRays2
  ThickThinLines
  ThickThinLines2
  ThinWavyLetters
  Vertigo
  WantedCircular
  Wave
  WavyChess
  WavyColorLetters
End Enum
[C#]

public enum TextStyleEnum
{
  AncientMosaic,
  BlackOverlap,
  Bullets,
  Bullets2,
  CaughtInTheNet,
  CaughtInTheNet2,
  Chalkboard,
  Chess,
  Chess3D,
  Chipped,
  Circles,
  Collage,
  Corrosion,
  CrossShadow,
  CrossShadow2,
  Cut,
  Darts,
  Distortion,
  FingerPrints,
  Flash,
  Ghostly,
  Graffiti,
  Graffiti2, 
  Halo,
  InBandages,
  Jail,
  Lego,
  Mass,
  MeltingHeat,
  Negative,
  Overlap,
  Overlap2,
  PaintMess,
  Rough,
  Spiderweb,
  Split,
  Snow,
  Stitch,
  Strippy,
  SunAndWarmAir,
  SunRays,
  SunRays2,
  ThickThinLines,
  ThickThinLines2,
  ThinWavyLetters,
  Vertigo,
  WantedCircular,
  Wave,
  WavyChess,
  WavyColorLetters
}

Default value

If the TextStyle property is not set, TextStyleEnum.Chalkboard is used by default.

Usage

[VB.NET]

' Example 1: simple assignment
SampleCaptcha.TextStyle = TextStyleEnum.Snow

' Example 2: basic randomization
Dim rand As Random = New Random()
Dim max As Integer = _ 
  System.Enum.GetValues(GetType(TextStyleEnum)).Length
SampleCaptcha.TextStyle = CType(rand.Next(max), TextStyleEnum)

' Example 3: basic randomization using RandomizationHelper.vb
SampleCaptcha.TextStyle = _
  RandomizationHelper.GetRandomTextStyle()

' Example 4: advanced randomization using RandomizationHelper.vb
Dim styles As TextStyleEnum() = { _
  TextStyleEnum.Lego, _
  TextStyleEnum.Ghostly, _
  TextStyleEnum.FingerPrints, _
  TextStyleEnum.Graffiti2, _
  TextStyleEnum.Collage _
}

SampleCaptcha.TextStyle = _
  RandomizationHelper.GetRandomTextStyle(styles)
[C#]

// Example 1: simple assignment
SampleCaptcha.TextStyle = TextStyleEnum.Snow;

// Example 2: basic randomization
Random rand = new Random();
int max = Enum.GetValues(typeof(TextStyleEnum)).Length;
SampleCaptcha.TextStyle = (TextStyleEnum)(rand.Next(max));

// Example 3: basic randomization using RandomizationHelper.cs
SampleCaptcha.TextStyle = 
  RandomizationHelper.GetRandomTextStyle();

// Example 4: advanced randomization using RandomizationHelper.cs
TextStyleEnum[] styles = { 
  TextStyleEnum.Lego, 
  TextStyleEnum.Ghostly, 
  TextStyleEnum.FingerPrints, 
  TextStyleEnum.Graffiti2, 
  TextStyleEnum.Collage 
};

SampleCaptcha.TextStyle = 
  RandomizationHelper.GetRandomTextStyle(styles);

Notes

While some CAPTCHA algorithms always uppercase the random code drawn in the image and some always lowercase it, CAPTCHA validation is always case-insensitive.

You might communicate this fact to your users by automatically uppercasing (or lowercasing) the input as they type. This can be achieved with JavaScript, and can prevent any confusion on the part of the user about how exactly they need to type the CAPTCHA code.

Screenshots

AncientMosaic

BotDetect ASP.NET CAPTCHA AncientMosaic algorithm screenshot

BlackOverlap

BotDetect ASP.NET CAPTCHA BlackOverlap algorithm screenshot

Bullets

BotDetect ASP.NET CAPTCHA Bullets algorithm screenshot

Bullets2

BotDetect ASP.NET CAPTCHA Bullets2 algorithm screenshot

CaughtInTheNet

BotDetect ASP.NET CAPTCHA CaughtInTheNet algorithm screenshot

CaughtInTheNet2

BotDetect ASP.NET CAPTCHA CaughtInTheNet2 algorithm screenshot

Chalkboard

BotDetect ASP.NET CAPTCHA Chalkboard algorithm screenshot

Chess

BotDetect ASP.NET CAPTCHA Chess algorithm screenshot

Chess3D

BotDetect ASP.NET CAPTCHA Chess3D algorithm screenshot

Chipped

BotDetect ASP.NET CAPTCHA Chipped algorithm screenshot

Circles

BotDetect ASP.NET CAPTCHA Circles algorithm screenshot

Collage

BotDetect ASP.NET CAPTCHA Collage algorithm screenshot

Corrosion

BotDetect ASP.NET CAPTCHA Corrosion algorithm screenshot

CrossShadow

BotDetect ASP.NET CAPTCHA CrossShadow algorithm screenshot

CrossShadow2

BotDetect ASP.NET CAPTCHA CrossShadow2 algorithm screenshot

Cut

BotDetect ASP.NET CAPTCHA Cut algorithm screenshot

Darts

BotDetect ASP.NET CAPTCHA Darts algorithm screenshot

Distortion

BotDetect ASP.NET CAPTCHA Distortion algorithm screenshot

FingerPrints

BotDetect ASP.NET CAPTCHA FingerPrints algorithm screenshot

Flash

BotDetect ASP.NET CAPTCHA Flash algorithm screenshot

Ghostly

BotDetect ASP.NET CAPTCHA Ghostly algorithm screenshot

Graffiti

BotDetect ASP.NET CAPTCHA Graffiti algorithm screenshot

Graffiti2

BotDetect ASP.NET CAPTCHA Graffiti2 algorithm screenshot

Halo

BotDetect ASP.NET CAPTCHA Halo algorithm screenshot

InBandages

BotDetect ASP.NET CAPTCHA InBandages algorithm screenshot

Jail

BotDetect ASP.NET CAPTCHA Jail algorithm screenshot

Lego

BotDetect ASP.NET CAPTCHA Lego algorithm screenshot

Mass

BotDetect ASP.NET CAPTCHA Mass algorithm screenshot

MeltingHeat

BotDetect ASP.NET CAPTCHA MeltingHeat algorithm screenshot

Negative

BotDetect ASP.NET CAPTCHA Negative algorithm screenshot

Overlap

BotDetect ASP.NET CAPTCHA Overlap algorithm screenshot

Overlap2

BotDetect ASP.NET CAPTCHA Overlap2 algorithm screenshot

PaintMess

BotDetect ASP.NET CAPTCHA PaintMess algorithm screenshot

Rough

BotDetect ASP.NET CAPTCHA Rough algorithm screenshot

SpiderWeb

BotDetect ASP.NET CAPTCHA SpiderWeb algorithm screenshot

Split

BotDetect ASP.NET CAPTCHA Split algorithm screenshot

Snow

BotDetect ASP.NET CAPTCHA Snow algorithm screenshot

Stitch

BotDetect ASP.NET CAPTCHA Stitch algorithm screenshot

Strippy

BotDetect ASP.NET CAPTCHA Strippy algorithm screenshot

SunAndWarmAir

BotDetect ASP.NET CAPTCHA SunAndWarmAir algorithm screenshot

SunRays

BotDetect ASP.NET CAPTCHA SunRays algorithm screenshot

SunRays2

BotDetect ASP.NET CAPTCHA SunRays2 algorithm screenshot

ThickThinLines

BotDetect ASP.NET CAPTCHA ThickThinLines algorithm screenshot

ThickThinLines2

BotDetect ASP.NET CAPTCHA ThickThinLines2 algorithm screenshot

ThinWavyLetters

BotDetect ASP.NET CAPTCHA ThinWavyLetters algorithm screenshot

Vertigo

BotDetect ASP.NET CAPTCHA Vertigo algorithm screenshot

WantedCircular

BotDetect ASP.NET CAPTCHA WantedCircular algorithm screenshot

Wave

BotDetect ASP.NET CAPTCHA Wave algorithm screenshot

WavyChess

BotDetect ASP.NET CAPTCHA WavyChess algorithm screenshot

WavyColorLetters

BotDetect ASP.NET CAPTCHA WavyColorLetters algorithm screenshot