CustomSnapline

The CustomSnapline project shows how to add a text baseline snapline to a UserControl with a Label on it.

 
 
 
 
 
(0)
5,000 times
Add to favorites
2/4/2011
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
VB.NET
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.button1 = New System.Windows.Forms.Button
        Me.controlWithCustomSnapline1 = New CustomSnapline.ControlWithCustomSnapline
        Me.SuspendLayout()
        '
        'button1
        '
        Me.button1.Location = New System.Drawing.Point(149, 113)
        Me.button1.Name = "button1"
        Me.button1.Size = New System.Drawing.Size(75, 23)
        Me.button1.TabIndex = 0
        Me.button1.Text = "button1"
        Me.button1.UseVisualStyleBackColor = True
        '
        'controlWithCustomSnapline1
        '
        Me.controlWithCustomSnapline1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.controlWithCustomSnapline1.Location = New System.Drawing.Point(255, 49)
        Me.controlWithCustomSnapline1.Name = "controlWithCustomSnapline1"
        Me.controlWithCustomSnapline1.Size = New System.Drawing.Size(148, 148)
        Me.controlWithCustomSnapline1.TabIndex = 1
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(697, 458)
        Me.Controls.Add(Me.controlWithCustomSnapline1)
        Me.Controls.Add(Me.button1)
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)

    End Sub

    Friend WithEvents button1 As Button
    Friend WithEvents controlWithCustomSnapline1 As ControlWithCustomSnapline




End Class