Leadtools.SpecialEffects Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.8.31
DrawFrame Method
See Also  Example
Leadtools.SpecialEffects Namespace > SpecialEffectsProcessor Class : DrawFrame Method




Draws a rectangular frame having the specified style, color, and border width onto the target device context.

Overload List

Overload Description
DrawFrame(Graphics,Rectangle,SpecialEffectsFrameStyleFlags,Int32,Color,Int32,Color,Color,Int32,Color,Color) Draws a rectangular frame having the specified style, color, and border width onto the target device context.  
DrawFrame(IntPtr,Rectangle,SpecialEffectsFrameStyleFlags,Int32,Color,Int32,Color,Color,Int32,Color,Color) Draws a rectangular frame having the specified style, color, and border width onto the target device context.  

Example

This example shows the minimum requirements for using the DrawFrame method to draw a frame with a palette.

Visual Basic Copy Code
Public Sub DrawFrame(ByVal g As Graphics, ByVal destRect As Rectangle)
   Dim processor As SpecialEffectsProcessor = New SpecialEffectsProcessor()
   processor.DrawFrame(g, destRect, SpecialEffectsFrameStyleFlags.OuterRaised, 2, Color.Red, 2, Color.FromArgb(100, 100, 100), Color.Black, 2, Color.Gray, Color.Yellow) ' inner band highlight color
End Sub
C# Copy Code
public void DrawFrame(Graphics g, Rectangle destRect) 

   SpecialEffectsProcessor processor = new SpecialEffectsProcessor(); 
   processor.DrawFrame(g, 
                       destRect, /* Destination rectangle */ 
                       SpecialEffectsFrameStyleFlags.OuterRaised, /* outer band raised */ 
                       2, /* middle band width*/ 
                       Color.Red, /* middle band color */ 
                       2, /* inner band width*/ 
                       Color.FromArgb(100, 100, 100), /* inner band shadow color */ 
                       Color.Black, /* inner band highlight color */ 
                       2, /* outer band width*/ 
                       Color.Gray, /* inner band shadow color */ 
                       Color.Yellow); /* inner band highlight color */ 
}

Remarks

For general information, refer to Implementing Special Effects .

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also